Platform win 2k server
Visual Studio c++ 6 (service pack 6)
When compiling the Server (0.9.1b) the following errors occur linking:
Linking...
MSVCRT.lib(MSVCRT.dll) : error LNK2005: _calloc already defined in LIBCMT.lib(calloc.obj)
MSVCRT.lib(MSVCRT.dll) : error LNK2005: _free already defined in LIBCMT.lib(free.obj)
LINK : warning LNK4098: defaultlib "MSVCRT" conflicts with use of other libs; use /NODEFAULTLIB:library
Release/FileZilla server.exe : fatal error LNK1169: one or more multiply defined symbols found
Error executing link.exe.
FileZilla server.exe - 3 error(s), 1 warning(s)
To overcome the error I added /FORCE:MULTIPLE to the link project options which returns:
Linking...
MSVCRT.lib(MSVCRT.dll) : warning LNK4006: _calloc already defined in LIBCMT.lib(calloc.obj); second definition ignored
MSVCRT.lib(MSVCRT.dll) : warning LNK4006: _free already defined in LIBCMT.lib(free.obj); second definition ignored
LINK : warning LNK4098: defaultlib "MSVCRT" conflicts with use of other libs; use /NODEFAULTLIB:library
Release/FileZilla server.exe : warning LNK4088: image being generated due to /FORCE option; image may not run
FileZilla server.exe - 0 error(s), 4 warning(s)
While this ignores the call to the second definition I don't think this is the correct way to deal with the error.
Any suggestions?
Glen
Compiling Server 0.9.1b
Moderator: Project members
-
- 504 Command not implemented
- Posts: 6
- Joined: 2004-07-16 18:33
- First name: Glen
- Last name: Arason
- Location: Edmonton, Alberta, Canada
Hi again.
Actually it's the static linked MT lib that is causing the problem. Further to your post I decided to see what would happen if compiled it with the MT DLL runtime libs. I removed the /FORCE:MULTIPLE which I had included earlier and it compiles just fine with MD selected. I then added /D_STATIC_CPPLIB to ensure the application was linking to libcpmt.lib, and all seems ok.
I'm still concerned it might cause some other malfunction later on.
Thanks for your help.
Glen
Actually it's the static linked MT lib that is causing the problem. Further to your post I decided to see what would happen if compiled it with the MT DLL runtime libs. I removed the /FORCE:MULTIPLE which I had included earlier and it compiles just fine with MD selected. I then added /D_STATIC_CPPLIB to ensure the application was linking to libcpmt.lib, and all seems ok.
I'm still concerned it might cause some other malfunction later on.
Thanks for your help.
Glen