User forums > Using Code::Blocks

BCC 5.5 Link error

(1/2) > >>

Ross:
Hello,

I am new to Code::Blocks and just getting back into C/C++ programming. I started a new dynamic dll project and get the following messages when I try to compile. Thanks for any help.


Project   : DLL Sample
Compiler  : Borland C++ Compiler 5.5 (called directly)
Directory : C:\cbTest\
--------------------------------------------------------------------------------
Switching to target: default
Compiling: main.c
Borland C++ 5.5.1 for Win32 Copyright (c) 1993, 2000 Borland
main.c:
Compiling: ..\cbc\MT_WIN32\COUNTER.C
Borland C++ 5.5.1 for Win32 Copyright (c) 1993, 2000 Borland
..\cbc\MT_WIN32\COUNTER.C:
Compiling: ..\cbc\MT_WIN32\FLAG.C
Borland C++ 5.5.1 for Win32 Copyright (c) 1993, 2000 Borland
..\cbc\MT_WIN32\FLAG.C:
Compiling: ..\cbc\MT_WIN32\KEY.C
Borland C++ 5.5.1 for Win32 Copyright (c) 1993, 2000 Borland
..\cbc\MT_WIN32\KEY.C:
Compiling: ..\cbc\MT_WIN32\MAILBOX.C
Borland C++ 5.5.1 for Win32 Copyright (c) 1993, 2000 Borland
..\cbc\MT_WIN32\MAILBOX.C:
Compiling: ..\cbc\MT_WIN32\MULTITSK.C
Borland C++ 5.5.1 for Win32 Copyright (c) 1993, 2000 Borland
..\cbc\MT_WIN32\MULTITSK.C:
Compiling: ..\cbc\MT_WIN32\PRINTF.C
Borland C++ 5.5.1 for Win32 Copyright (c) 1993, 2000 Borland
..\cbc\MT_WIN32\PRINTF.C:
Compiling: ..\cbc\MT_WIN32\RESOURCE.C
Borland C++ 5.5.1 for Win32 Copyright (c) 1993, 2000 Borland
..\cbc\MT_WIN32\RESOURCE.C:
Compiling: ..\cbc\MT_WIN32\WPIPE.C
Borland C++ 5.5.1 for Win32 Copyright (c) 1993, 2000 Borland
..\cbc\MT_WIN32\WPIPE.C:
Linking dynamic library: sample.dll
Turbo Incremental Link 5.00 Copyright (c) 1997, 2000 Borland
Fatal: Unable to open file 'SAMPLE.DLL'
Process terminated with status 1 (0 minutes, 3 seconds)
1 errors, 0 warnings

thomas:
Please switch compiler logging to "full commandline" (compiler options, rightmost tab) and re-post the log.

I don't know Borland at all, but someone who does will need some more information to be able to help.
"Compiling main.c" does not give a lot of hints to what may be wrong  ;)

drac:
I've done a little research and it seams that there is a bug in C::B.

Borland's ilink32 doesn't support "-o output" switch. You can investigate what C::B actually does
by exporting the project to a Makefile.

Here are the commands to compile the default dll sample:
bcc32 -c main.c
ilink32 main.obj, main.dll, -Tpd -Gi, user32.lib

-Tpd to generate a dll
-Gi to generate a lib file.

For more information go to this link.

Somebody should fix this bug... of course after version 1.0 is released  :wink:

drac:
"Win32 GUI Application" template needs cw32.lib in order  to compile.

"Console Application" template needs cw32.lib and import32.lib in order to compile.

"Win32 GUI Application" and "Console Application" templates have the ilink32.exe parameters
set correctly...

Hmm, more bugs for Borland C++...

severach:
You can create your DLL with any of the compilers with the instructions here:

http://forums.codeblocks.org/index.php/topic,946.0.html

Navigation

[0] Message Index

[#] Next page

Go to full version