Author Topic: BCC32 support broke?  (Read 18867 times)

Anonymous

  • Guest
BCC32 support broke?
« on: June 04, 2005, 04:16:28 am »
Hi

Iím having trouble getting code::blocks to work with BCC32 version 5.5. I had the compiler installed for a while before I even found out about the code::blocks ide and it works fine from the console; however, when I try to compile a program from the IDE I get the following error messages:

Project   : Console application
Compiler  : Borland C++ Compiler 5.5 (called directly)
Directory : D:\nathan\programming\test\
--------------------------------------------------------------------------------
Linking console executable: D:\nathan\programming\test\test.exe
Turbo Incremental Link 5.00 Copyright (c) 1997, 2000 Borland
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 'std::basic_ostream<char, std::char_traits<char> >::put(char)' referenced from D:\NATHAN\PROGRAMMING\TEST\.OBJS\MAIN.OBJ
Error: Unresolved external 'std::basic_ostream<char, std::char_traits<char> >::flush()' referenced from D:\NATHAN\PROGRAMMING\TEST\.OBJS\MAIN.OBJ
Error: Unresolved external 'std::cout' referenced from D:\NATHAN\PROGRAMMING\TEST\.OBJS\MAIN.OBJ
Error: Unresolved external 'std::basic_ostream<char, std::char_traits<char> >& std::operator <<(std::basic_ostream<char, std::char_traits<char> >&, const char *)' referenced from D:\NATHAN\PROGRAMMING\TEST\.OBJS\MAIN.OBJ
Error: Unresolved external 'std::basic_ostream<char, std::char_traits<char> >::operator <<(std::basic_ostream<char, std::char_traits<char> >& (*)(std::basic_ostream<char, std::char_traits<char> >&))' referenced from D:\NATHAN\PROGRAMMING\TEST\.OBJS\MAIN.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
Process terminated with status 1 (0 minutes, 0 seconds)
0 errors, 0 warnings
 

I have never used this ide before, I really like it but I have to use BCC32 because I have some pre-compiled libraries which are only compiled for BCC32 and I canít get them for any other compiler. Can someone help me out?

Anonymous

  • Guest
BCC32 support broke?
« Reply #1 on: June 10, 2005, 10:19:25 am »
You have to link with one of BCC's cw32*.lib runtime library files :

cw32.lib = Single Threaded / Static Link
cw32i.lib = Single Threaded / Dynamic Link (cc3250.dll)
cw32mt.lib = Multi Threaded / Static Link
cw32mti.lib = Multi Threaded / Dynamic Link (cc3250mt.dll)

Anonymous

  • Guest
BCC32 support broke?
« Reply #2 on: June 14, 2005, 05:45:21 am »
Thanks, I'll do that :)

Offline rickg22

  • Lives here!
  • ****
  • Posts: 2283
BCC32 support broke?
« Reply #3 on: June 14, 2005, 05:59:00 pm »
Is there a way to add this to the project's compiler configuration so it selects one by default?

Anonymous

  • Guest
BCC32 support broke?
« Reply #4 on: June 17, 2005, 01:15:32 am »
The default linker options I use :

cw32mt (in left pane of BCC32/linker tab) [~to link w/ static/multithreaded lib~]
-x -Gn (in right pane of linker tab) so that no map file is generated [~cosmetic~]

default compiler options: nothing

Offline rickg22

  • Lives here!
  • ****
  • Posts: 2283
BCC32 support broke?
« Reply #5 on: June 17, 2005, 01:23:30 am »
it seems then that we have to add the specific libraries, so we need 4 options on the templates. Or actually, 4 different projects  :-/ with one same template.

No, wait - I think this belongs to "compiler options", not templates. Yiannis, is there a way we can choose from 4 libraries in the compiler er linker options for a certain compiler?

Offline mandrav

  • Project Leader
  • Administrator
  • Lives here!
  • *****
  • Posts: 4305
    • Code::Blocks IDE
BCC32 support broke?
« Reply #6 on: June 17, 2005, 08:40:39 am »
Quote from: rickg22
Yiannis, is there a way we can choose from 4 libraries in the compiler er linker options for a certain compiler?

Currently, no.

Yiannis.
Be patient!
This bug will be fixed soon...

Offline rickg22

  • Lives here!
  • ****
  • Posts: 2283
BCC32 support broke?
« Reply #7 on: June 17, 2005, 09:03:10 am »
Well, Then I'm sure you could add the Single Threaded / Static Link library by default. Those who know what they're doing might remove it :)

Offline duncanka

  • Multiple posting newcomer
  • *
  • Posts: 53
Re: BCC32 support broke?
« Reply #8 on: August 18, 2005, 12:12:53 am »
Quote
You have to link with one of BCC's cw32*.lib runtime library files :

cw32.lib = Single Threaded / Static Link
cw32i.lib = Single Threaded / Dynamic Link (cc3250.dll)
cw32mt.lib = Multi Threaded / Static Link
cw32mti.lib = Multi Threaded / Dynamic Link (cc3250mt.dll)

I tried this, since I had the same problem as whoever started this thread, and I still got a whole slew of errors:
Turbo Incremental Link 5.00 Copyright (c) 1997, 2000 Borland
Error: Unresolved external 'GetModuleHandleA' referenced from C:\PROGRAM FILES\CPP TOOLS\BORLAND\BCC55\LIB\CW32.LIB|xxv
Error: Unresolved external 'GetProcAddress' referenced from C:\PROGRAM FILES\CPP TOOLS\BORLAND\BCC55\LIB\CW32.LIB|xxv
Error: Unresolved external 'LoadLibraryA' referenced from C:\PROGRAM FILES\CPP TOOLS\BORLAND\BCC55\LIB\CW32.LIB|hrdir_b
Error: Unresolved external 'GetVersion' referenced from C:\PROGRAM FILES\CPP TOOLS\BORLAND\BCC55\LIB\CW32.LIB|errormsg
Error: Unresolved external 'GetCurrentThreadId' referenced from C:\PROGRAM FILES\CPP TOOLS\BORLAND\BCC55\LIB\CW32.LIB|errormsg
Error: Unresolved external 'EnumThreadWindows' referenced from C:\PROGRAM FILES\CPP TOOLS\BORLAND\BCC55\LIB\CW32.LIB|errormsg
Error: Unresolved external 'GetModuleFileNameA' referenced from C:\PROGRAM FILES\CPP TOOLS\BORLAND\BCC55\LIB\CW32.LIB|errormsg
Error: Unresolved external 'GetOEMCP' referenced from C:\PROGRAM FILES\CPP TOOLS\BORLAND\BCC55\LIB\CW32.LIB|mbctype
Error: Unresolved external 'GetCPInfo' referenced from C:\PROGRAM FILES\CPP TOOLS\BORLAND\BCC55\LIB\CW32.LIB|mbctype
Error: Unresolved external 'GetACP' referenced from C:\PROGRAM FILES\CPP TOOLS\BORLAND\BCC55\LIB\CW32.LIB|mbctype
Error: Unresolved external 'MessageBoxA' referenced from C:\PROGRAM FILES\CPP TOOLS\BORLAND\BCC55\LIB\CW32.LIB|errormsg
Error: Unresolved external 'GetStdHandle' referenced from C:\PROGRAM FILES\CPP TOOLS\BORLAND\BCC55\LIB\CW32.LIB|errormsg
Error: Unresolved external 'WriteFile' referenced from C:\PROGRAM FILES\CPP TOOLS\BORLAND\BCC55\LIB\CW32.LIB|errormsg
Error: Unresolved external 'GetLocalTime' referenced from C:\PROGRAM FILES\CPP TOOLS\BORLAND\BCC55\LIB\CW32.LIB|ermsghlp
Error: Unresolved external '_wsprintfA' referenced from C:\PROGRAM FILES\CPP TOOLS\BORLAND\BCC55\LIB\CW32.LIB|ermsghlp
Error: Unresolved external 'CreateFileA' referenced from C:\PROGRAM FILES\CPP TOOLS\BORLAND\BCC55\LIB\CW32.LIB|ermsghlp
Error: Unresolved external 'CloseHandle' referenced from C:\PROGRAM FILES\CPP TOOLS\BORLAND\BCC55\LIB\CW32.LIB|ermsghlp
Error: Unresolved external 'ExitProcess' referenced from C:\PROGRAM FILES\CPP TOOLS\BORLAND\BCC55\LIB\CW32.LIB|initexit
Error: Unresolved external 'GetVersionExA' referenced from C:\PROGRAM FILES\CPP TOOLS\BORLAND\BCC55\LIB\CW32.LIB|platform
Error: Unresolved external 'VirtualAlloc' referenced from C:\PROGRAM FILES\CPP TOOLS\BORLAND\BCC55\LIB\CW32.LIB|virtmem
Error: Unresolved external 'VirtualFree' referenced from C:\PROGRAM FILES\CPP TOOLS\BORLAND\BCC55\LIB\CW32.LIB|virtmem
Error: Unresolved external 'GlobalMemoryStatus' referenced from C:\PROGRAM FILES\CPP TOOLS\BORLAND\BCC55\LIB\CW32.LIB|heap
Error: Unresolved external 'RtlUnwind' referenced from C:\PROGRAM FILES\CPP TOOLS\BORLAND\BCC55\LIB\CW32.LIB|ta
Error: Unresolved external 'SetHandleCount' referenced from C:\PROGRAM FILES\CPP TOOLS\BORLAND\BCC55\LIB\CW32.LIB|handles
Error: Unresolved external 'GetStartupInfoA' referenced from C:\PROGRAM FILES\CPP TOOLS\BORLAND\BCC55\LIB\CW32.LIB|handles
Error: Unresolved external 'GetFileType' referenced from C:\PROGRAM FILES\CPP TOOLS\BORLAND\BCC55\LIB\CW32.LIB|__isatty
Error: Unresolved external 'GetLastError' referenced from C:\PROGRAM FILES\CPP TOOLS\BORLAND\BCC55\LIB\CW32.LIB|ioerror
Error: Unresolved external 'SetFilePointer' referenced from C:\PROGRAM FILES\CPP TOOLS\BORLAND\BCC55\LIB\CW32.LIB|__lseek
Error: Unresolved external 'UnhandledExceptionFilter' referenced from C:\PROGRAM FILES\CPP TOOLS\BORLAND\BCC55\LIB\CW32.LIB|except
Error: Unresolved external 'SetConsoleCtrlHandler' referenced from C:\PROGRAM FILES\CPP TOOLS\BORLAND\BCC55\LIB\CW32.LIB|signal
Error: Unresolved external 'RaiseException' referenced from C:\PROGRAM FILES\CPP TOOLS\BORLAND\BCC55\LIB\CW32.LIB|xx
Error: Unresolved external 'GetEnvironmentStrings' referenced from C:\PROGRAM FILES\CPP TOOLS\BORLAND\BCC55\LIB\CW32.LIB|startup
Error: Unresolved external 'GetCommandLineA' referenced from C:\PROGRAM FILES\CPP
[cut]

Quote
The default linker options I use :

cw32mt (in left pane of BCC32/linker tab) [~to link w/ static/multithreaded lib~]
-x -Gn (in right pane of linker tab) so that no map file is generated [~cosmetic~]

I also tried this, but it had absolutely no effect.
Anyone have any suggestions?

Offline rickg22

  • Lives here!
  • ****
  • Posts: 2283
Re: BCC32 support broke?
« Reply #9 on: August 18, 2005, 02:00:16 am »
It seems those are Microsoft dependencies. Try adding kernel32 and user32 to the libraries.

Offline duncanka

  • Multiple posting newcomer
  • *
  • Posts: 53
Re: BCC32 support broke?
« Reply #10 on: August 18, 2005, 06:14:55 am »
It seems those are Microsoft dependencies. Try adding kernel32 and user32 to the libraries.

Worked like a charm. Thanks!

Offline rozniy

  • Single posting newcomer
  • *
  • Posts: 3
Re: BCC32 support broke?
« Reply #11 on: August 19, 2005, 09:24:43 am »
It seems those are Microsoft dependencies. Try adding kernel32 and user32 to the libraries.

Worked like a charm. Thanks!

I have exactly the same problem, but don't understand the instructions here. Do you mean copy kernel32.dll and user32.dll into the Borland lib directory, or into the CodeBlocks lib directory, or do you mean something else entirely?

Please help us Obi-wan, you're our only hope.

I also tried a wxWidgets project using Borland as the CodeBlocks' compiler, but it stopped, saying something about -pipe being an illegal option. No Makefile was created, so I can't modify it.

Edited:
I'm not sure what I just did, but my "Hello sailormoon" program compiles and runs now... I'm terribly confused.


Edited again:
Put d:\borland\bcc55\lib\import32.lib into the"Link Library" of the Project's Build Options. That did the job!


I'll go and fiddle around a little more...

Edited yet again:
... add the cw32.lib AND the import32.lib.
« Last Edit: August 19, 2005, 09:59:50 am by rozniy »

Offline rickg22

  • Lives here!
  • ****
  • Posts: 2283
Re: BCC32 support broke?
« Reply #12 on: August 19, 2005, 09:52:44 am »
It means adding them to your project's "Linker libraries". In main menu -> project -> build options.

Offline ansswd

  • Single posting newcomer
  • *
  • Posts: 3
Re: BCC32 support broke?
« Reply #13 on: December 11, 2005, 07:01:18 am »
Project   : Console application
Compiler  : Borland C++ Compiler 5.5 (called directly)
Directory : D:\WORK\C\
--------------------------------------------------------------------------------
Switching to target: default
ilink32.exe -ap       -L"C:\PROG\Borland\BCC55\Lib" -L"C:\PROG\Borland\BCC55\Lib\PSDK"  -L"C:\PROG\Borland\BCC55\Lib" -L"C:\PROG\Borland\BCC55\Lib\PSDK" -L"C:\WINDOWS\system32" c0x32 .objs\HelloWorldFromCodeBlocks.o ,"D:\WORK\C\CodeBlockProjHelloWorld.exe",,  "C:\WINDOWS\system32\kernel32.dll" "C:\WINDOWS\system32\user32.dll" ,,
Turbo Incremental Link 5.00 Copyright (c) 1997, 2000 Borland
Error: Error processing module C:\WINDOWS\SYSTEM32\KERNEL32.DLL
Process terminated with status 1 (0 minutes, 0 seconds)
0 errors, 0 warnings
 

sbs.pub

  • Guest
Re: BCC32 support broke?
« Reply #14 on: October 27, 2012, 11:07:25 am »
I faced the same issue and adding only the cw32 and import32 libs resolved it. Trying to add user32 and kernel32 resulted in error as seen in previous post. Guess they are not needed.