• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 319
  • Last Modified:

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

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
rxraza
Asked:
rxraza
  • 5
  • 5
1 Solution
 
avizitCommented:
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
 
nonubikCommented:
You'll have to change one of the objs (full path) name.
0
 
rxrazaAuthor Commented:
From where do I have to  change the objs full path name?
0
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 
nonubikCommented:
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
 
rxrazaAuthor Commented:
I am using Visual Studio 6.0 IDE
0
 
rxrazaAuthor Commented:
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
 
nonubikCommented:
SOURCE=..\..\..\EX_CLASS\BCMenu.cpp
# ADD CPP /FoBCMenu2.obj
0
 
nonubikCommented:
The /Fo compiler option change the object output file name.
0
 
rxrazaAuthor Commented:
Now it is saying that both files are configured to produce output file xyz.sbr
0
 
nonubikCommented:
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
 
rxrazaAuthor Commented:
In addition to that from the IDE I deleted the redundant *.h and *.cpp files.
0

Featured Post

Upgrade your Question Security!

Add Premium security features to your question to ensure its privacy or anonymity. Learn more about your ability to control Question Security today.

  • 5
  • 5
Tackle projects and never again get stuck behind a technical roadblock.
Join Now