News:

Accounts with zero posts and zero activity during the last months will be deleted periodically to fight SPAM!

Main Menu

codeblocks borland free compiler single file error compile

Started by lazy_john, July 16, 2013, 03:19:09 PM

Previous topic - Next topic

lazy_john

hi
I'm trying to change from MinGW(all functions as expected, i can compile projects/single files with MinGW) to Borland(Embarcadero) 5.5 free compiler(it compiles faster); all is functional;
I think there may be a bug in C::B, i can't compile single files(files without project) with Borland compiler; i can compile single files with Borland from command line

Is there a way to make C::B compile Borland single files??(project compile works ok.. but i need single files)

my install: C::B 12.11 / MinGW TDM-GCC 4.7.1 / Embarcadero free compiler 5.5.1 incremental linker 5.00 / Winxp


bcc32.exe -q   -IC:\Borland\BCC55\include  -o"C:\projects\11\hw_td.obj" -c "C:\projects\11\hw_td.cpp"
C:\projectse\11\hw_td.cpp:
ilink32.exe -q -ap   -LC:\Borland\BCC55\lib -LC:\Borland\BCC55\lib\psdk  c0x32 "C:\projects\11\hw_td.obj","C:\projects\11\hw_td.exe",,,,
Error: Unresolved external '___CRTL_VCL_Init' referenced from C:\BORLAND\BCC55\LIB\C0X32.OBJ
Error: Unresolved external '___CRTL_MEM_UseBorMM' referenced from C:\BORLAND\BCC55\LIB\C0X32.OBJ
Error: Unresolved external '___CRTL_VCLLIB_Linkage' referenced from C:\BORLAND\BCC55\LIB\C0X32.OBJ
Error: Unresolved external '__ExceptInit' referenced from C:\BORLAND\BCC55\LIB\C0X32.OBJ
Error: Unresolved external 'GetModuleHandleA' referenced from C:\BORLAND\BCC55\LIB\C0X32.OBJ
Error: Unresolved external '__startup' referenced from C:\BORLAND\BCC55\LIB\C0X32.OBJ
Error: Unresolved external '__GetExceptDLLinfoInternal' referenced from C:\BORLAND\BCC55\LIB\C0X32.OBJ
Error: Unresolved external 'HeapAlloc' referenced from C:\BORLAND\BCC55\LIB\C0X32.OBJ
Error: Unresolved external '___CRTL_TLS_SetValue' referenced from C:\BORLAND\BCC55\LIB\C0X32.OBJ
Error: Unresolved external '___CRTL_TLS_InitThread' referenced from C:\BORLAND\BCC55\LIB\C0X32.OBJ
Error: Unresolved external '___CRTL_TLS_Alloc' referenced from C:\BORLAND\BCC55\LIB\C0X32.OBJ
Error: Unresolved external '___CRTL_TLS_GetValue' referenced from C:\BORLAND\BCC55\LIB\C0X32.OBJ
Error: Unresolved external 'GetProcessHeap' referenced from C:\BORLAND\BCC55\LIB\C0X32.OBJ
Error: Unresolved external 'HeapFree' referenced from C:\BORLAND\BCC55\LIB\C0X32.OBJ
Error: Unresolved external '___CRTL_TLS_ExitThread' referenced from C:\BORLAND\BCC55\LIB\C0X32.OBJ
Error: Unresolved external '___CRTL_TLS_Free' referenced from C:\BORLAND\BCC55\LIB\C0X32.OBJ
Error: Unresolved external '_printf' referenced from C:\projects\11\HW_TD.OBJ
Error: Unresolved external '__matherr' referenced from C:\BORLAND\BCC55\LIB\C0X32.OBJ
Error: Unresolved external '__matherrl' referenced from C:\BORLAND\BCC55\LIB\C0X32.OBJ
Error: Unresolved external '__fmode' referenced from C:\BORLAND\BCC55\LIB\C0X32.OBJ
Error: Unresolved external '__argv_expand_ptr' referenced from C:\BORLAND\BCC55\LIB\C0X32.OBJ
Error: Unresolved external '__wargv_expand_ptr' referenced from C:\BORLAND\BCC55\LIB\C0X32.OBJ
Error: Unresolved external '__handle_setargv' referenced from C:\BORLAND\BCC55\LIB\C0X32.OBJ
Error: Unresolved external '__handle_exitargv' referenced from C:\BORLAND\BCC55\LIB\C0X32.OBJ
Error: Unresolved external '__handle_wsetargv' referenced from C:\BORLAND\BCC55\LIB\C0X32.OBJ
Error: Unresolved external '__handle_wexitargv' referenced from C:\BORLAND\BCC55\LIB\C0X32.OBJ
Error: Unresolved external '__fileinfo' referenced from C:\BORLAND\BCC55\LIB\C0X32.OBJ
Error: Unresolved external '__setargv__' referenced from C:\BORLAND\BCC55\LIB\C0X32.OBJ
Error: Unresolved external '__setenvp__' referenced from C:\BORLAND\BCC55\LIB\C0X32.OBJ
Error: Unresolved external '__turboFloat' referenced from C:\BORLAND\BCC55\LIB\C0X32.OBJ


It seems there's a linker error but i can't understand why it happens, all paths work ok with project compile; single file compile works ok from command line Borland and from MinGW by switching to MinGW profile

edit: i found something similar http://forums.next.codeblocks.org/index.php/topic,12506.0.html
edit2: found solution http://forums.next.codeblocks.org/index.php/topic,425.0.html; or
                            http://forums.next.codeblocks.org/index.php/topic,7407.0.html
Quote
rozniy
Put x:\borland\bcc55\lib\import32.lib and cw32.lib into the"Settings>Compiler>Linker settings>Link Library"
ty

edit3: on the same subject but GUI this time; im trying to compile a simple allert; it works if the source is inside a project but not if is a single file(file wo project)
something similar here: http://forums.next.codeblocks.org/index.php/topic,5934.0.html

the error i get is

bcc32.exe -q   -IC:\Borland\BCC55\include  -o"C:\projects\11\hw_tw.obj" -c "C:\projects\11\hw_tw.cpp"
C:\projects\11\hw_tw.cpp:
ilink32.exe -q -ap   -LC:\Borland\BCC55\lib -LC:\Borland\BCC55\lib\psdk  c0x32 "C:\projects\11\hw_tw.obj","C:\projects\11\hw_tw.exe",,C:\Borland\Bcc55\Lib\cw32mti.lib C:\Borland\Bcc55\Lib\import32.lib ,,
Error: Unresolved external '_main' referenced from C:\BORLAND\BCC55\LIB\C0X32.OBJ


edit4: i figured it out, i swiched from WINAPI WinMain() to _tmain() as here: http://stackoverflow.com/questions/11247699/lnk2019-unresolved-external-symbol-main-referenced-in-function-tmaincrtstar;

solved