Compiling Server 0.9.1b

Need help with FileZilla Server? Something does not work as expected? In this forum you may find an answer.

Moderator: Project members

Post Reply
Message
Author
glenara
504 Command not implemented
Posts: 6
Joined: 2004-07-16 18:33
First name: Glen
Last name: Arason
Location: Edmonton, Alberta, Canada

Compiling Server 0.9.1b

#1 Post by glenara » 2004-07-17 17:50

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

User avatar
botg
Site Admin
Posts: 35507
Joined: 2004-02-23 20:49
First name: Tim
Last name: Kosse

#2 Post by botg » 2004-07-17 23:09

Don't use the MT DLL runtime libs, use the statically linked MT libs.

glenara
504 Command not implemented
Posts: 6
Joined: 2004-07-16 18:33
First name: Glen
Last name: Arason
Location: Edmonton, Alberta, Canada

#3 Post by glenara » 2004-07-18 12:04

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

Post Reply