Discussion:
BCB5: Link fails in IDE, but succeeds at command-line
(too old to reply)
Martin
2008-08-04 18:43:24 UTC
Permalink
I have a fairly large project in C++ Builder 5, running on a Vista
Business laptop (not sure if that last is relevant). When I compile &
link the project at the command line, everything is fine. When I
compile in the IDE, I get an unresolved external error in a third-party
component, and it's always the same function.

The really weird thing is that if I copy my C++ Builder install &
libraries from my computer to another computer that was able to the
link, it's still able to do the link, but if I copy the C++ Builder
install & libraries from another computer to mine, the link still fails.

I know that the function exists and is in the .BPL for the component
since the build from the command-line works. What could be causing the
IDE linker to fail?

Thanks,
Martin
Martin
2008-08-04 21:31:26 UTC
Permalink
More information:

The command line that works isn't using the built-in MAKE, it's using
a different tool, passing in different set of LIBs to use. The exported
.mak from the IDE explicitly references the .LIB for the third-party and
fails. My other makefile does not reference it explicitly and succeeds.
If I add the .LIB to my makefile, the link fails. I'm assuming that
the make that works is using an indirect link to the .BPI through a
#pragma link.

Thanks,
Martin
Post by Martin
I have a fairly large project in C++ Builder 5, running on a Vista
Business laptop (not sure if that last is relevant). When I compile &
link the project at the command line, everything is fine. When I
compile in the IDE, I get an unresolved external error in a third-party
component, and it's always the same function.
The really weird thing is that if I copy my C++ Builder install &
libraries from my computer to another computer that was able to the
link, it's still able to do the link, but if I copy the C++ Builder
install & libraries from another computer to mine, the link still fails.
I know that the function exists and is in the .BPL for the component
since the build from the command-line works. What could be causing the
IDE linker to fail?
Thanks,
Martin
Martin
2008-08-04 21:53:54 UTC
Permalink
And yet more...

After rebuilding the third-party with "Use dynamic RTL" off, I can now
link my project in the IDE.

Why would my computer be different? I just double checked another
computer and it has "Use dynamic RTL" checked and it links fine. The
only difference in the setup of Builder is one computer is XP and the
other Vista.
Post by Martin
The command line that works isn't using the built-in MAKE, it's using
a different tool, passing in different set of LIBs to use. The exported
.mak from the IDE explicitly references the .LIB for the third-party and
fails. My other makefile does not reference it explicitly and succeeds.
If I add the .LIB to my makefile, the link fails. I'm assuming that
the make that works is using an indirect link to the .BPI through a
#pragma link.
Thanks,
Martin
Post by Martin
I have a fairly large project in C++ Builder 5, running on a Vista
Business laptop (not sure if that last is relevant). When I compile &
link the project at the command line, everything is fine. When I
compile in the IDE, I get an unresolved external error in a
third-party component, and it's always the same function.
The really weird thing is that if I copy my C++ Builder install &
libraries from my computer to another computer that was able to the
link, it's still able to do the link, but if I copy the C++ Builder
install & libraries from another computer to mine, the link still fails.
I know that the function exists and is in the .BPL for the component
since the build from the command-line works. What could be causing the
IDE linker to fail?
Thanks,
Martin
Loading...