Code::Blocks Forums
User forums => Using Code::Blocks => Topic started by: jackflap on May 18, 2007, 03:32:25 pm
-
I installed Code::Blocks and the Borland C++ Compiler 5.5.
Borland is installed to the default C:\Borland\BCC55 and has been detected in CB. I'm running CodeBlocks svn build 3876.
I originally created a new Win32 GUI Project and tried to compile and build and it gave me an Unable to open file 'GDI32.LIB' error. I looked at this post http://forums.codeblocks.org/index.php/topic,2111.0.html and have made a little headway, but am still having problems.
What I've done so far is this:
I added a Search Directory to the Linker in Settings -> Compiler & Debugger -> Search Directories of: C:\Borland\Bcc55\lib and have added -L"c:\Borland\Bcc55\lib\PSDK" to both bcc32.cfg and ilink32.cfg under C:\Borland\BCC55\Bin
Now when I build, it gives me the following error message:
:: Expected an option: Lc:\Borland\Bcc55\lib\PSDK
:: === Build finished: 1 errors, 0 warnings ===
However, looking at the build log, the error it seems to be complaining about does exist (the -LC:\Borland\BCC55\lib\PSDK is being passed):
ilink32.exe -q -ap -v -LC:\Borland\BCC55\lib -LC:\Borland\BCC55\lib\PSDK c0x32 obj\Debug\main.obj ,bin\Debug\Test.exe,,gdi32.lib user32.lib kernel32.lib ,,
On another note, if I take the -L"c:\Borland\Bcc55\lib\PSDK" out of ilink32.cfg, it gives me the following:
-------------- Build: Release in Test ---------------
ilink32.exe -q -aa -LC:\Borland\BCC55\lib -LC:\Borland\BCC55\lib\PSDK c0w32 obj\Release\main.obj ,bin\Release\Test.exe,,gdi32.lib user32.lib kernel32.lib ,,
Error: Unresolved external '___CRTL_VCL_Init' referenced from C:\BORLAND\BCC55\LIB\C0W32.OBJ
Error: Unresolved external '___CRTL_MEM_UseBorMM' referenced from C:\BORLAND\BCC55\LIB\C0W32.OBJ
Error: Unresolved external '___CRTL_VCLLIB_Linkage' referenced from C:\BORLAND\BCC55\LIB\C0W32.OBJ
Error: Unresolved external '__ExceptInit' referenced from C:\BORLAND\BCC55\LIB\C0W32.OBJ
Error: Unresolved external '__startup' referenced from C:\BORLAND\BCC55\LIB\C0W32.OBJ
Error: Unresolved external '__GetExceptDLLinfoInternal' referenced from C:\BORLAND\BCC55\LIB\C0W32.OBJ
Error: Unresolved external '___CRTL_TLS_SetValue' referenced from C:\BORLAND\BCC55\LIB\C0W32.OBJ
Error: Unresolved external '___CRTL_TLS_InitThread' referenced from C:\BORLAND\BCC55\LIB\C0W32.OBJ
Error: Unresolved external '___CRTL_TLS_Alloc' referenced from C:\BORLAND\BCC55\LIB\C0W32.OBJ
Error: Unresolved external '___CRTL_TLS_GetValue' referenced from C:\BORLAND\BCC55\LIB\C0W32.OBJ
Error: Unresolved external '___CRTL_TLS_ExitThread' referenced from C:\BORLAND\BCC55\LIB\C0W32.OBJ
Error: Unresolved external '___CRTL_TLS_Free' referenced from C:\BORLAND\BCC55\LIB\C0W32.OBJ
Error: Unresolved external '__matherr' referenced from C:\BORLAND\BCC55\LIB\C0W32.OBJ
Error: Unresolved external '__matherrl' referenced from C:\BORLAND\BCC55\LIB\C0W32.OBJ
Error: Unresolved external '__fmode' referenced from C:\BORLAND\BCC55\LIB\C0W32.OBJ
Error: Unresolved external '__argv_expand_ptr' referenced from C:\BORLAND\BCC55\LIB\C0W32.OBJ
Error: Unresolved external '__wargv_expand_ptr' referenced from C:\BORLAND\BCC55\LIB\C0W32.OBJ
Error: Unresolved external '__handle_setargv' referenced from C:\BORLAND\BCC55\LIB\C0W32.OBJ
Error: Unresolved external '__handle_exitargv' referenced from C:\BORLAND\BCC55\LIB\C0W32.OBJ
Error: Unresolved external '__handle_wsetargv' referenced from C:\BORLAND\BCC55\LIB\C0W32.OBJ
Error: Unresolved external '__handle_wexitargv' referenced from C:\BORLAND\BCC55\LIB\C0W32.OBJ
Error: Unresolved external '__fileinfo' referenced from C:\BORLAND\BCC55\LIB\C0W32.OBJ
Error: Unresolved external '__setargv__' referenced from C:\BORLAND\BCC55\LIB\C0W32.OBJ
Error: Unresolved external '__setenvp__' referenced from C:\BORLAND\BCC55\LIB\C0W32.OBJ
Error: Unresolved external '__turboFloat' referenced from C:\BORLAND\BCC55\LIB\C0W32.OBJ
Process terminated with status 2 (0 minutes, 0 seconds)
0 errors, 0 warnings
And it doesn't generate an executable. Does anyone have any ideas how I can solve this.
Things I've tried:
- I've added C:\Borland\BCC55, C:\Borland\BCC55\Bin, C:\Borland\BCC55\Lib, C:\Borland\BCC55\Lib\PSDK to the Windows environment PATH
- I've added a manual linker option through the settings which is exactly what's in the error message - Lc:\Borland\Bcc55\lib\PSDK (without the -)
- I've tried passing -Lc:\Borland\Bcc55\lib\PSDK to the compiler through the settings again, didnt work
- I've tried setting the linker settings to pass the -Lc:\Borland\Bcc55\lib\PSDK through the linker's other options & paths
I'm out of ideas. Any help would be greatly appreciated.
Alex
-
I will try to duplicate the issue and see if I can help you.
I have duplicated the error, now seeing if I can fix it.
Note, I have not used my BCC install for several months it may be damaged.
Tim S
-
Add the Library cw32mti makes the release build works.
"Project" -> "Build Options"
Change to "Linker Settings"
Add "Link Libraries" the library cw32mti
Note, The debug build still does NOT work.
Note, I found this info in thread
http://forums.codeblocks.org/index.php?topic=425.msg5077
Tim S
-
"Project" -> "Properties"
Select "Build Targets"
Change "Debug" Target to Type "GUI Application"
Debug should compile then.
Tim S
-
Hi,
Thanks very much. This worked a charm.
I ended up removing the changes I had made to the bcc32.cfg and ilink32.cfg under C:\Borland\BCC55\Bin. So, from the perspective of a fresh install, all I did was add the Link library cw32mti, set the target type to 'GUI Application' and add the PSDK path to the Search Directory option- and voila, I had a blank form.
Help very much appreciated,
Alex
-
Updated the wizard. :)