I'm porting an existing LccWin32 project to Pelles C and have encountered what could be a "deal killer".
My project is a scripting engine and I use Dyncall http://www.dyncall.org/ (http://www.dyncall.org/) for making dynamic DLL calls during runtime.
When I compile, Pelles-C gives this error message:
POLINK: fatal error: File not found: 'LIBCMT.lib'.
Now, if I add LIBCMT.lib (from VC) to the \pellesc\LIB\ directory, I get a bunch of "redefinition" error messages:
POLINK: error: Symbol '___argc' is multiply defined: 'crt.lib(_crt0dat.obj)' and 'libcmt.lib(crt0dat.obj)'.
POLINK: error: Symbol '___argv' is multiply defined: 'crt.lib(_crt0dat.obj)' and 'libcmt.lib(crt0dat.obj)'.
POLINK: error: Symbol '___wargv' is multiply defined: 'crt.lib(_crt0dat.obj)' and 'libcmt.lib(crt0dat.obj)'.
POLINK: error: Symbol '_exit' is multiply defined: 'crt.lib(exit.obj)' and 'libcmt.lib(crt0dat.obj)'.
etc...etc...etc...
I have isolated it to the Dyncall LIB files.
What I don't understand is that, LccWin32 does not appear to use LIBCMT.lib either and yet produces no such error.
At least I can't find it anywhere.
Any ideas ?
Thanks,
Steve A.
Look in the headers for your dyncall library... is there a #pragma comment(lib, "libcmt.lib") in there? If so try commenting it out.
Quote from: Steve A. on October 31, 2010, 02:25:45 AM
POLINK: fatal error: File not found: 'LIBCMT.lib'.
This sounds for me like the
crtmt.lib (
C run
time
multi
threat) from Pelles C.
QuotePOLINK: fatal error: File not found: 'LIBCMT.lib'.
You can try to use linker option -nodefaultlib (Ignore standard places)
and add crtmt.lib to linker library files.
Quote from: CommonTater on October 31, 2010, 07:55:20 AM
Look in the headers for your dyncall library... is there a #pragma comment(lib, "libcmt.lib") in there? If so try commenting it out.
I looked thru the headers..., no mention of libcmt.lib.
Quote from: AlexN on October 31, 2010, 11:27:19 AM
This sounds for me like the crtmt.lib (C runtime multi threat) from Pelles C.
Quote from: timovjl on October 31, 2010, 12:29:37 PM
You can try to use linker option -nodefaultlib (Ignore standard places) and add crtmt.lib to linker library files.
Ok, I made these adjustments and it seems to have solved the problem.
I still don't know why it was trying to grab
libcmt.lib even though I can't find it listed anywhere.
Thanks guys.
Steve A
QuoteI still don't know why it was trying to grab libcmt.lib even though I can't find it listed anywhere.
It can come from lib with directive /DEFAULTLIB:"LIBCMT"
Quote from: timovjl on November 01, 2010, 07:12:09 AM
It can come from lib with directive /DEFAULTLIB:"LIBCMT"
Hmm...,
I think you are right.
Thanks Timo,
Steve A