[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

the source file C:\XYZ.cpp and C:\ABC.cpp are both configured to build C:\nnn.obj, the project cant be built project cannot be built

Posted on 2004-08-12
11
Medium Priority
?
308 Views
Last Modified: 2010-04-01
Hi:

I moved my running application to another dir and I changed the references to the header files. Now when I am having the following error when I try to recompile it.

The source file C:\somefile.cpp and C:\some_dir\anotherfile.cpp are both configured to build C:\nnn.obj, the project cannot be built.

How do I get around it? thanks in anticipation.

0
Comment
Question by:rxraza
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 5
  • 5
11 Comments
 
LVL 11

Expert Comment

by:avizit
ID: 11789533
I guess you have to create a fresh project and include the files to the new project and then compile. You have changed the header reference in your sourcefiles ..but the references in the project files aren't changed.
0
 
LVL 16

Expert Comment

by:nonubik
ID: 11791519
You'll have to change one of the objs (full path) name.
0
 

Author Comment

by:rxraza
ID: 11793170
From where do I have to  change the objs full path name?
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 16

Expert Comment

by:nonubik
ID: 11793247
What IDE do you use?
For C++.NET right click on the cpp, choose Properties -> C/C++ -> Output Files -> Object File Name
There modify.
0
 

Author Comment

by:rxraza
ID: 11793361
I am using Visual Studio 6.0 IDE
0
 

Author Comment

by:rxraza
ID: 11793404
I opened up the dsw file in notepad and got two source files references in it as yo0u ca see
in the following section.

SOURCE=..\..\CommonSource\EXClasses\BCMenu.cpp
# End Source File
# Begin Source File

SOURCE=..\..\..\EX_CLASS\BCMenu.cpp
# End Source File
# Begin Source File

I went ahead and put a '#' in the second reference as following
# SOURCE=..\..\..\EX_CLASS\BCMenu.cpp

And from this point on I can't load my project anymore. Does the IDE keep track if the file was modified by handtyping?

Any ideas about loading my project file in the IDE
0
 
LVL 16

Accepted Solution

by:
nonubik earned 375 total points
ID: 11793484
SOURCE=..\..\..\EX_CLASS\BCMenu.cpp
# ADD CPP /FoBCMenu2.obj
0
 
LVL 16

Expert Comment

by:nonubik
ID: 11793494
The /Fo compiler option change the object output file name.
0
 

Author Comment

by:rxraza
ID: 11793582
Now it is saying that both files are configured to produce output file xyz.sbr
0
 
LVL 16

Expert Comment

by:nonubik
ID: 11793629
If you don't need the .sbr files you can just Settings->C/C++->General   uncheck 'Generete browse info'
If you need it, put
# ADD CPP /FoBCMenu2.obj /FrBCMenu2.sbr
0
 

Author Comment

by:rxraza
ID: 11794736
In addition to that from the IDE I deleted the redundant *.h and *.cpp files.
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Article by: SunnyDark
This article's goal is to present you with an easy to use XML wrapper for C++ and also present some interesting techniques that you might use with MS C++. The reason I built this class is to ease the pain of using XML files with C++, since there is…
Often, when implementing a feature, you won't know how certain events should be handled at the point where they occur and you'd rather defer to the user of your function or class. For example, a XML parser will extract a tag from the source code, wh…
The viewer will learn how to pass data into a function in C++. This is one step further in using functions. Instead of only printing text onto the console, the function will be able to perform calculations with argumentents given by the user.
The viewer will learn how to user default arguments when defining functions. This method of defining functions will be contrasted with the non-default-argument of defining functions.

656 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question