Reputation: 1697
I have a C++ Builder XE project with several 3rd party controls. Some of the 3rd party controls did not have a specific XE package so I wound up taking 2010 and compiling, etc...
After many gyrations, I can get my project to compile but not link.
I get the error: [ILINK32 Error] Fatal: Unable to open file 'THEMESRV.OBJ'
I'm using LMD VCL tools (http://www.lmdinnovative.com/products/vcl/) where I think this is coming from. See, in CBuilder 6 project and older version of LMD tools there exists a Themesrv.obj file. My larger project was to convert from CBuilder6 to XE and in so doing I downloaded the latest 2010 version of LMD's controls; the Builder6 controls would not compile under XE.
Now if I create a brand new XE project and include some of the suspect controls from LMD components, I get clean compiles and links.
I even did silly things like copying the themesrv.obj file into my project's build space only to get reference problems.
Any suggestions on tracking this down? I'm not explicitly including any LIB or OBJ files in my project manager and I've gone through the project XML file looking for bogus references...
Thoughts/Suggestions?
Upvotes: 0
Views: 5183
Reputation: 2632
With packages/components, it is almost never an .obj file that you really need in this situation. It is either a .lib file or a .bpi file (depending on whether or not you are using static/dynamic linking)
In this case, you appear to already know which set of packages you're dealing with, so you should be able to add the right file/path references to your project. Bpi files should be listed in the packages options, the path to the lib file should be in the Directories and Conditionals->Library paths, you can also explicitly add the .lib to you project, but this should not be necessary)
If you're uncertain about which lib/bpi file(s) to use, tdump can be your ally here. Running tdump on these files should show you a line that says "implements: WHATEVER.obj" for the one(s) you need.
Upvotes: 2