Discussion:
trying to link a large project with ilink32
(too old to reply)
Bruce Larrabee
2007-09-19 13:54:25 UTC
Permalink
Hello everyone,

(A quick note here, the reason I'm trying to use ilink32 on this project
is that I'd like to compile some of the object files with different
settings than the rest. If any of you know if and/or how this can be
done from BDS2006's IDE or for that matter ANY other means please let
me know, thanks...)

I'm trying to link our largest app with ilink32 and I'm have difficulties.

I've been using C++Builder since version 1.0 and I am currently doing all
our development work with BDS 2006.

I've successfully used ilink32 to link a couple of our small apps (2 to 6
object files and no use of any of our own libs, dll or lib). No problem.

But when attempting to use ilink32 to link our main app no such luck.

The program has 112 object files, and uses 3 in house dlls.

Currently I am using this command line:

ilink32 -aa -Tpe -Gn -v -L"C:\Program Files\Borland\BDS\4.0\lib\debug";"C:\Program
Files\Borland\BDS\4.0\lib\release";"C:\Program Files\Borland\BDS\4.0\lib";"C:\Program
Files\Borland\BDS\4.0\lib\obj";"C:\Program Files\Borland\BDS\4.0\lib\psdk";"C:\Documents and Settings\Zorro\My
Documents\Borland Studio Projects\Bpl"; -j"C:\Documents and Settings\Zorro\My Documents\Borland Studio
Projects\Cambridge\Debug_~1"; -r -x c0w32.obj vcl.bpi rtl.bpi vclx.bpi xmlrtl.bpi vclactnband.bpi bcbsmp.bpi vclie.bpi
vclib.bpi sysinit.obj @CambridgeObjs.rsp, Debug_Build\Cambridge.exe,", Debug_Build\Cambridge.map", @CambridgeLibs.rsp,,
@CambridgeRes.rsp

Note the use of the response files:

@CambridgeObjs.rsp
@CambridgeLibs.rsp
@CambridgeRes.rsp

These contain the listed object files, lib files and resource files respectively.

If anyone would like (need?) to see them let me know. I don't want to spam the group
etc.

At this stage I'm getting about three page of 'Unresolved Externals' errors.

Oddly, I can't seem to see any pattern in the actual errors.

For example, there are several from c0w32.obj but when I link the smaller projects
this file is linked in the same way (to the best of my knowledge) and no problem?

Next, there are quite a few from my dlls.

And then the rest are from my ordinary .obj files, and these in particular I don't see
and pattern that tells me why these are 'Unresolved Externals' and yet they represent
and tiny (TINY) fraction of apparently similar candidates??

Any help would be very much appreciated...

Bruce Larrabee
Ed Mulroy [TeamB]
2007-09-19 15:36:24 UTC
Permalink
The command line you are using is massive and I suspect either beyond the
ability of ilink32 to handle from the command line or beyond some OS limit
on command line length.

Try using a response file for most or all of the command line.

. Ed
Post by Bruce Larrabee
Hello everyone,
(A quick note here, the reason I'm trying to use ilink32 on this project
is that I'd like to compile some of the object files with different
settings than the rest. If any of you know if and/or how this can be
done from BDS2006's IDE or for that matter ANY other means please let
me know, thanks...)
I'm trying to link our largest app with ilink32 and I'm have difficulties.
I've been using C++Builder since version 1.0 and I am currently doing all
our development work with BDS 2006.
I've successfully used ilink32 to link a couple of our small apps (2 to 6
object files and no use of any of our own libs, dll or lib). No problem.
But when attempting to use ilink32 to link our main app no such luck.
The program has 112 object files, and uses 3 in house dlls.
ilink32 -aa -Tpe -Gn -v -L"C:\Program
Files\Borland\BDS\4.0\lib\debug";"C:\Program
Files\Borland\BDS\4.0\lib\release";"C:\Program
Files\Borland\BDS\4.0\lib";"C:\Program
Files\Borland\BDS\4.0\lib\obj";"C:\Program
Files\Borland\BDS\4.0\lib\psdk";"C:\Documents and Settings\Zorro\My
Documents\Borland Studio Projects\Bpl"; -j"C:\Documents and
Settings\Zorro\My Documents\Borland Studio
Projects\Cambridge\Debug_~1"; -r -x c0w32.obj vcl.bpi rtl.bpi vclx.bpi
xmlrtl.bpi vclactnband.bpi bcbsmp.bpi vclie.bpi vclib.bpi sysinit.obj
@CambridgeObjs.rsp, Debug_Build\Cambridge.exe,",
@CambridgeObjs.rsp
@CambridgeLibs.rsp
@CambridgeRes.rsp
These contain the listed object files, lib files and resource files respectively.
If anyone would like (need?) to see them let me know. I don't want to spam the group
etc.
At this stage I'm getting about three page of 'Unresolved Externals' errors.
Oddly, I can't seem to see any pattern in the actual errors.
For example, there are several from c0w32.obj but when I link the smaller projects
this file is linked in the same way (to the best of my knowledge) and no problem?
Next, there are quite a few from my dlls.
And then the rest are from my ordinary .obj files, and these in particular I don't see
and pattern that tells me why these are 'Unresolved Externals' and yet they represent
and tiny (TINY) fraction of apparently similar candidates??
Any help would be very much appreciated...
Bob Gonder
2007-09-20 02:49:56 UTC
Permalink
Post by Bruce Larrabee
-r -x c0w32.obj vcl.bpi rtl.bpi vclx.bpi xmlrtl.bpi vclactnband.bpi bcbsmp.bpi vclie.bpi
@CambridgeRes.rsp
Odd, that -x followed by a map file name
Also seems to be a typo in the map file name.
Post by Bruce Larrabee
Cambridge.exe,", Debug_Build\Cambridge.map"
Make sure your @CambridgeLibs.rsp includes
import32.lib and one of the cw32 libs

You might also want to look into adding those paths into
\bin\ilink32.cfg so they don't clutter up the commandline.
Zara
2007-09-20 06:29:46 UTC
Permalink
On Wed, 19 Sep 2007 06:54:25 -0700, Bruce Larrabee
Post by Bruce Larrabee
Hello everyone,
(A quick note here, the reason I'm trying to use ilink32 on this project
is that I'd like to compile some of the object files with different
settings than the rest. If any of you know if and/or how this can be
done from BDS2006's IDE or for that matter ANY other means please let
me know, thanks...)
<..>

If what you mean is that you need to compile some of the source files
with different compiler settings than the others, then all you need to
do is open the project that contains all sources, select the source
file in project window, right.click on it,, 'Edit local-options', and
customize them.

'Customized' files appera in project window with a check over their
icon, and you may always remove local options as needed.

Hope this helps!

Zara

Loading...