C Builder File .obj
May 04, 2012 For some reason I'm having a really difficult time using.obj files in C++ Builder. My understanding is, if you have a.cpp and a.h file and compile those.
CBuilder Developer. Sat, 02 Aug 2003 22:20:02 GMT. Fatal: Unable to open file 'DBTABLES.OBJ' I get this error message when I try to install a componant. I opened it in 3D Builder and I am trying to export it to OBJ. 3D Builder Export to obj with. The issue could occur if OBJ file is exported correctly or the.
If you have been playing around with Delphi packages compiled for C Builder in Borland Developer Studio or CodeGear RAD Studio, you'll have undoubtedly run into this error message. You could also run into that if you are not dealing with Delphi packages (e.g. Using a run-time package, static library). Let's start with Delphi packages.
Interface Builder File
What is suspicious is the way the linker reports the error - such as ILINK32 Error Fatal: Unable to open file MyComponent.obj. You search the entire hard drive for MyComponent.obj only to find the closest thing to be MyComponent.dcu, which is compiled in Delphi from MyComponent.pas. So how and where do you get MyComponent.obj? The answer is, this.obj file is actually in a container with the extension of.LIB. If your package with MyComponent.pas is called MyPackage.bpl, then you need to look for MyPackage.lib. While an installed package should get automatically added to the default list of included packages when you create a new project file, it doesn't always happen (i.e.
All you have to do then is manually open up your current project file (.cbproj) in a text editor and add MyPackage.lib into the tag. Reload your project and you should be able to link successfully. If you are not dealing with Delphi packages and you get that error message, that means you're trying to use a static library, or a run-time package (and some times even design-time package which are not dropped onto a form / data module). This could easily be fixed and is the expected way linkers work. There are 2 ways you can fix this: 1) Add the lib file to the project (I don't like this, as you rely on the user of the static library to remember to add the lib file every time they use it in a new project) 2) Add the following line to a header file which is guaranteed to be included when the static library is used: #pragma comment(lib, 'your library name.lib') That's it. I haven't tried C Builder 2009, but I hope CodeGear have found a better way to do this.
Actually, I'd suggest that they simply make all Delphi compiler generated C Builder files include that #pragma comment(lib.) line so that we never have to muck around with the.cbproj files any more. In fact, this would also mean that there will be no annoying messages that prompts you to remove packages you don't need when you create and try to save a new project. Said.But still this didn't solve my problem.
I work in RAD Studio 2007 (C Builder). Now I created a console project to work with the GNU GSL library (Having downloaded the distribution with the 2 dll's needed (libgsl.dll and libgslcblas.dll), I next used implib to convert them to lib's. So far so good. But when I simply added both resulting lib's to the project, I got this stupid Linker 'can't find.OBJ file' error.
Well, on your advice I pinned these two pragma lines ('#pragma comment(lib, 'libgsl.lib')' and '#pragma comment(lib, 'libgslcblas.lib')') to a header file and included it. Compiling now without adding the libraries I get another error: ILINK32 Error Error: Unresolved external 'gslsfbesselJ0' referenced from PROJECTFOLDER MAIN.OBJ Adding the lib's back in brings back the 'good old' 'can't find.OBJ file' error. Man, it drives me crazy!
What Program Opens Obj Files
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 (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. Fs2004 constellation.
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. 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. Well, the obj file in question is doesn't seem apart of any controls listed in the IDE's component list. I went from a Cbuilder6 version of LMD's tools to their CBuilder 2010 version.
One of the apparent changes was the removal of Themes since they can now leverage that in the borland product itself (I guess). My project loads fine in the IDE with all the components (it didn't before) and it compiles clean just won't link. It's as if the IDE is somehow thinking I need this OBJ file and what gets me is it's not listed in the linker command line as shown in the property of the project.
– Nov 15 '10 at 22:29. @Eric, an.obj file corresponds to a source file. The way packages/components work is to take all the individual objs and bundle them together. You're looking for the right.lib/.bpi file which contains the.obj file's data. (the linker will stop asking when it finds the.lib/.bpi) You have to make sure that file is either 1) in the Project-Options-Packages-Build with runtime packages listbox(asuming the checkbox is checked) 2) The.lib file can be found on one of the paths listed in Project-Options-Directories and Conditionals-Library path, or 3) the.lib file is added to the project. – Nov 16 '10 at 0:18.