Command-line link error
Command-line link error
I just recently purchased SDAC 4 and it installed just fine and I can compile & link just fine in my IDE, C++ Builder 5 Pro. However, when I try to link from the command-line, I get a link error saying that couldn't open file DBCONSTS.OBJ. There is a DBCONSTS.DCU in the Cbuilder5\Lib\Obj, which I think is from the Dephi/Pascal compiler. If I add the .DCU to the linker input file, I get a fatal access violation during link.
Like I said, it builds just fine in the IDE, but due to the nature of the project I need to have it build from the command-line. What do I need to do to get it to link?
Thanks,
Marty
Like I said, it builds just fine in the IDE, but due to the nature of the project I need to have it build from the command-line. What do I need to do to get it to link?
Thanks,
Marty
The reason of the problem may be in wrong provided parameters to compiler, specifically missed paths to C++Builder's dcu files. Please show the command you are using to build your application.
Last edited by Antaeus on Wed 25 Jul 2007 09:20, edited 1 time in total.
I'm using the link command:
ilink32 @ptw_link.opt
The contents of ptw_link.opt are:
-aa -Tpe -GD -s -Gn -M -v -H:0xF00000 -S:0xF00000 +
-LY:\POLYWIN;V:\POLYTECH;D:\APRO +
-LD:\ABBREVIA\SOURCE;V:\DBLIB +
-LD:\CBuilder5\Sdac\Lib +
-LD:\CBuilder5\Lib\Obj +
C0W32.OBJ +
Y:\POLYWIN\POLYWIN.OBJ +
Y:\POLYWIN\CUSTmwe.OBJ, +
Z:\POLYWIN.EXE, +
Z:\POLYWIN.MAP, +
POLYWIN.LIB +
HTMLHELP.LIB +
IMPORT32.LIB +
RPCNS4.LIB +
W3BTRV7.LIB +
A306_D51.LIB +
B304_R51.LIB +
VCLX50.LIB +
VCL50.LIB +
MEMMGR.LIB +
CP32MT.LIB +
CW32MT.LIB,, +
Y:\POLYWIN\POLYWIN.RES
ilink32 @ptw_link.opt
The contents of ptw_link.opt are:
-aa -Tpe -GD -s -Gn -M -v -H:0xF00000 -S:0xF00000 +
-LY:\POLYWIN;V:\POLYTECH;D:\APRO +
-LD:\ABBREVIA\SOURCE;V:\DBLIB +
-LD:\CBuilder5\Sdac\Lib +
-LD:\CBuilder5\Lib\Obj +
C0W32.OBJ +
Y:\POLYWIN\POLYWIN.OBJ +
Y:\POLYWIN\CUSTmwe.OBJ, +
Z:\POLYWIN.EXE, +
Z:\POLYWIN.MAP, +
POLYWIN.LIB +
HTMLHELP.LIB +
IMPORT32.LIB +
RPCNS4.LIB +
W3BTRV7.LIB +
A306_D51.LIB +
B304_R51.LIB +
VCLX50.LIB +
VCL50.LIB +
MEMMGR.LIB +
CP32MT.LIB +
CW32MT.LIB,, +
Y:\POLYWIN\POLYWIN.RES
Try to perform the following steps:
1) Create a new application from scratch.
2) Build this application from the command line.
3) Add the DB unit to the Uses clause, and build the application from the command line.
4) Add the MSAccess unit to the Uses clause, and build the application from the command line again.
Please inform us on what step you will encounter the problem with building.
1) Create a new application from scratch.
2) Build this application from the command line.
3) Add the DB unit to the Uses clause, and build the application from the command line.
4) Add the MSAccess unit to the Uses clause, and build the application from the command line again.
Please inform us on what step you will encounter the problem with building.
We use bpr2mak.exe and make.exe utilities to build our components. I'm not aware of your approach, but it seems to me that these lines are not correct in your options file:
-LD:\CBuilder5\Lib\Obj +
C0W32.OBJ +
Probably they should be changed with something like this:
-LD:\CBuilder5\lib\obj;D:\CBuilder5\lib
We recommend you to refer to resources dedicated to C++Builder (Borlands' forums, etc) for more information.
-LD:\CBuilder5\Lib\Obj +
C0W32.OBJ +
Probably they should be changed with something like this:
-LD:\CBuilder5\lib\obj;D:\CBuilder5\lib
We recommend you to refer to resources dedicated to C++Builder (Borlands' forums, etc) for more information.