Board index » cppbuilder » Re: Linking component problem - working

Re: Linking component problem - working


2007-03-21 02:07:44 PM
cppbuilder19
Okay, it is working, but it seems to be a strange fix.
I noticed that the obj files had not been updated since before I compiled
the component package under BDS2006. So I went to the linker output section
of the Project Options where I had previously selected "Generate All
C++Builder Files", and instead selected "Generate C++ Object files". The
result of this was that it created up to date obj files, but not a .bpl
file. So then I had to go back and re-select "Generate All C++Builder
Files" to create a .bpl file. Installed the new package. And it works.
When it says Generate ALL C++Builder files, I guess it doesn't really mean
all.
Why is this a two step operation?
Am I missing something here, should I have done it differently?
Thanks for your help Craig.
 
 

Re:Re: Linking component problem - working

In article < XXXX@XXXXX.COM >, "Gord" < XXXX@XXXXX.COM >
wrote:
Quote
Am I missing something here, should I have done it differently?
You shouldn't need the .obj files any more. Everything is in the .lib
files.
--
-David Dean
CodeGear C++ QA Engineer
<blogs.codegear.com/ddean/>
 

Re:Re: Linking component problem - working

Hi,
Thanks for sharing the resolution. Interesting
that old obj's are picked up first.
Quote
Why is this a two step operation?
Like David says, you do not need the obj's
because Generate all C++ files generates
static libraries, .lib files
The #pragma link "PagePrnt" must find the
obj first and use that so your step of creating
new obj's must have cleared up the use of old
obj's. But removing the .obj's altogether should
have cleared up the error too, as then the .lib
would be used to satisfy the link.
--Craig
 

{smallsort}

Re:Re: Linking component problem - working

Quote
Like David says, you do not need the obj's
because Generate all C++ files generates
static libraries, .lib files
The #pragma link "PagePrnt" must find the
obj first and use that so your step of creating
new obj's must have cleared up the use of old
obj's. But removing the .obj's altogether should
have cleared up the error too, as then the .lib
would be used to satisfy the link.
I deleted the obj files. Then I got the error "[Linker Fatal Error] Fatal:
Unable to open file 'PAGEPRNT.OBJ' "
I found the dclusr.lib file in the BDS\4.0\LIB directory. The linker was
already pointed to it, which obviously wasn't enough. So I added it to the
project. It worked, the program ran.
I don't recall previously (in BCB4) having to add a lib file to the project.
Have things changed in this arena since BCB4?
The question I now have is: What are the ramifications of this for
deployment? Any?