Dan D'Alimonte
2007-08-09 18:01:17 UTC
Hi.
I'm new to Borland and need some help with the commandline tools.
I'm working with code written in C++ Builder and attempting to compile it using the commandline tools so it can be added to an automated compile/test system. Code that is compiling in C++ Builder just fine will not compile with bcc32 though.
The following files were written in C++ Builder:
- main.cpp, which contains the main() method.
- INIFile.cpp/.h, A simple class for representing an INI file.
- INIParser.cpp/.h, A class that uses the VCL TIniFile class to parse an INI file.
The files were copied out of the C++ Builder project directory and a Makefile was written for them as follows:
- Makefile: ----
BDS=C:\Program Files\Borland\BDS\4.0
CC=bcc32
INCLUDES=-I"${BDS}\include";"${BDS}\include\vcl"
LIBPATH=-L"${BDS}\lib";"${BDS}\lib\release"
CFLAGS=-WC ${INCLUDES} ${LIBPATH}
LIBS=
OBJS = main.obj INIFile.obj INIParser.obj
main.exe : ${OBJS}
${CC} ${CFLAGS} ${OBJS} ${LIBS}
clean :
@DEL /Q *.exe
@DEL /Q *.tds
@DEL /Q *.obj
.cpp.obj :
@${CC} -c $&.cpp
----
Now, when I run 'make main.exe' I get a bunch of link errors that I cannot figure out:
- Errors: ----
MAKE Version 5.2 Copyright (c) 1987, 2000 Borland
Borland C++ 5.81 for Win32 Copyright (c) 1993, 2005 Borland
main.cpp:
Borland C++ 5.81 for Win32 Copyright (c) 1993, 2005 Borland
INIFile.cpp:
Borland C++ 5.81 for Win32 Copyright (c) 1993, 2005 Borland
INIParser.cpp:
bcc32 -WC -I"C:\Program Files\Borland\BDS\4.0\include";"C:\Program Files\Borland\BDS\4.0\include\vcl" -L"C:\Program Files\Borland\BDS\4.0\lib";"C:\Program Files\Borland\BDS\4.0\lib\release" main.obj INIFile.obj INIParser.obj
Borland C++ 5.81 for Win32 Copyright (c) 1993, 2005 Borland
Turbo Incremental Link 5.69 Copyright (c) 1997-2005 Borland
Error: Unresolved external 'System::__linkproc__ __fastcall LStrClr(void *)' referenced from C:\PROGRAM FILES\BORLAND\BDS\4.0\LIB\RELEASE\VCLE.LIB|dstring
Error: Unresolved external 'System::__linkproc__ __fastcall LStrFromPChar(System::AnsiString&, char *)' referenced from C:\PROGRAM FILES\BORLAND\BDS\4.0\LIB\RELEASE\VCLE.LIB|dstring
Error: Unresolved external 'Inifiles::TIniFile::' referenced from C:\DOCUMENTS AND SETTINGS\DAN\MY DOCUMENTS\SRC\IWTS\TRUNK\SRC\INIPARSER.OBJ
Error: Unresolved external '__fastcall Inifiles::TIniFile::~TIniFile()' referenced from C:\DOCUMENTS AND SETTINGS\DAN\MY DOCUMENTS\SRC\IWTS\TRUNK\SRC\INIPARSER.OBJ
Error: Unresolved external '__fastcall System::TObject::~TObject()' referenced from C:\DOCUMENTS AND SETTINGS\DAN\MY DOCUMENTS\SRC\IWTS\TRUNK\SRC\INIPARSER.OBJ
Error: Unresolved external 'System::__linkproc__ __fastcall LStrAsg(void *, const void *)' referenced from C:\PROGRAM FILES\BORLAND\BDS\4.0\LIB\RELEASE\VCLE.LIB|dstring
Error: Unresolved external '__fastcall Inifiles::TCustomIniFile::TCustomIniFile(const System::AnsiString)' referenced from C:\DOCUMENTS AND SETTINGS\DAN\MY DOCUMENTS\SRC\IWTS\TRUNK\SRC\INIPARSER.OBJ
** error 1 ** deleting main.exe
----
I am new to both C++ development and to using Borland tools and libraries, so any help people may be able to offer would be much appreciated.
Thanks.
I'm new to Borland and need some help with the commandline tools.
I'm working with code written in C++ Builder and attempting to compile it using the commandline tools so it can be added to an automated compile/test system. Code that is compiling in C++ Builder just fine will not compile with bcc32 though.
The following files were written in C++ Builder:
- main.cpp, which contains the main() method.
- INIFile.cpp/.h, A simple class for representing an INI file.
- INIParser.cpp/.h, A class that uses the VCL TIniFile class to parse an INI file.
The files were copied out of the C++ Builder project directory and a Makefile was written for them as follows:
- Makefile: ----
BDS=C:\Program Files\Borland\BDS\4.0
CC=bcc32
INCLUDES=-I"${BDS}\include";"${BDS}\include\vcl"
LIBPATH=-L"${BDS}\lib";"${BDS}\lib\release"
CFLAGS=-WC ${INCLUDES} ${LIBPATH}
LIBS=
OBJS = main.obj INIFile.obj INIParser.obj
main.exe : ${OBJS}
${CC} ${CFLAGS} ${OBJS} ${LIBS}
clean :
@DEL /Q *.exe
@DEL /Q *.tds
@DEL /Q *.obj
.cpp.obj :
@${CC} -c $&.cpp
----
Now, when I run 'make main.exe' I get a bunch of link errors that I cannot figure out:
- Errors: ----
MAKE Version 5.2 Copyright (c) 1987, 2000 Borland
Borland C++ 5.81 for Win32 Copyright (c) 1993, 2005 Borland
main.cpp:
Borland C++ 5.81 for Win32 Copyright (c) 1993, 2005 Borland
INIFile.cpp:
Borland C++ 5.81 for Win32 Copyright (c) 1993, 2005 Borland
INIParser.cpp:
bcc32 -WC -I"C:\Program Files\Borland\BDS\4.0\include";"C:\Program Files\Borland\BDS\4.0\include\vcl" -L"C:\Program Files\Borland\BDS\4.0\lib";"C:\Program Files\Borland\BDS\4.0\lib\release" main.obj INIFile.obj INIParser.obj
Borland C++ 5.81 for Win32 Copyright (c) 1993, 2005 Borland
Turbo Incremental Link 5.69 Copyright (c) 1997-2005 Borland
Error: Unresolved external 'System::__linkproc__ __fastcall LStrClr(void *)' referenced from C:\PROGRAM FILES\BORLAND\BDS\4.0\LIB\RELEASE\VCLE.LIB|dstring
Error: Unresolved external 'System::__linkproc__ __fastcall LStrFromPChar(System::AnsiString&, char *)' referenced from C:\PROGRAM FILES\BORLAND\BDS\4.0\LIB\RELEASE\VCLE.LIB|dstring
Error: Unresolved external 'Inifiles::TIniFile::' referenced from C:\DOCUMENTS AND SETTINGS\DAN\MY DOCUMENTS\SRC\IWTS\TRUNK\SRC\INIPARSER.OBJ
Error: Unresolved external '__fastcall Inifiles::TIniFile::~TIniFile()' referenced from C:\DOCUMENTS AND SETTINGS\DAN\MY DOCUMENTS\SRC\IWTS\TRUNK\SRC\INIPARSER.OBJ
Error: Unresolved external '__fastcall System::TObject::~TObject()' referenced from C:\DOCUMENTS AND SETTINGS\DAN\MY DOCUMENTS\SRC\IWTS\TRUNK\SRC\INIPARSER.OBJ
Error: Unresolved external 'System::__linkproc__ __fastcall LStrAsg(void *, const void *)' referenced from C:\PROGRAM FILES\BORLAND\BDS\4.0\LIB\RELEASE\VCLE.LIB|dstring
Error: Unresolved external '__fastcall Inifiles::TCustomIniFile::TCustomIniFile(const System::AnsiString)' referenced from C:\DOCUMENTS AND SETTINGS\DAN\MY DOCUMENTS\SRC\IWTS\TRUNK\SRC\INIPARSER.OBJ
** error 1 ** deleting main.exe
----
I am new to both C++ development and to using Borland tools and libraries, so any help people may be able to offer would be much appreciated.
Thanks.