Compiler Issue (MS Vis Studio)

Started by
1 comment, last by Bagpuss 19 years, 4 months ago
OK, I have somehow managed to break my program. I had a fully working program (Project A) with a number of classes I put in just as placeholders, so I wouldnt forget to add them later. (They were irrelevant for what I was working on) In another Project (Project B) I hve 2 classes that I would like to use in Project A to replace the placeholder classes. I have added these to the files section of Visual studio, and changed the location of the headers to point to my other project. (I dont want to copy them in to the project folder, as Im maintaining 2 versions of the same classes then) But when I go to compile, I get the error message "The Source Files d:\\Source\ProjectA\foo.cpp and D:\\Source\ProjectB\foo.cpp are both configured to produce the output d:\\Source\ProjectB\foo.obj. Project cannot be built" I have had a good louck amogst all the settings and cannot find out where to change this. I didnt link Project B into a, just referenced the 2 .h files. Before I give in and just copy the class files over to my new project and have to maintain 2 sets of code, can anyone tell me where / how to fix this. Thansk, Bp
Advertisement
Simple: you can only have one copy of foo.cpp in your project. Did you forget to remove foo.cpp from project A before adding the one from project b?
thanks for the reply. Yes, all copies of the old files are still there, but renamed _oldFoo and _oldBar.

Hmm, its a mystery

Bp

This topic is closed to new replies.

Advertisement