I'have added a test case to DUnit Test project in embarcadero c++ builder 2010. I can compile it fine but the linker fails saying "unresolved external" to a method in an .obj file from original project. If I add the .obj file to DUnit project it works fine. However I don't want to do it as there are huge number of .obj files in the original project and it will be a pain to add .obj files each time you want to test a new class. Is there a way to point the linker to search directories to look in for .obj files and get them from there. ( I'm not using the command line, but the c++ builder 2010 IDE).
Asked
Active
Viewed 579 times
1 Answers
0
If you go into Project Properties you can configure the directories that are searched for includes, libraries, etc. You can do this by build type or for all configurations.
However it's usually a bad idea to directly link other .obj files from a different project, as they may have been compiled with different settings . Why don't you just add your test case to the project without deleting anything from it?

M.M
- 138,810
- 21
- 208
- 365
-
I have added the test case to main project as you suggested and modified the main.cpp to run the GUI Test runner before the application starts. Now developer has to close the GUI Test runner to execute the application. Before this I tried setting the library path but it didn't work unless I specify the exact .obj file name in linker options or in pragma comments. – nadunDev Apr 18 '14 at 04:49