Page 1 of 1

GapiDraw Win32: Runtime Library: Multi-Thread == problem

PostPosted: Jun 5, 2007 @ 9:53am
by wprintf
Hello All.

Problem:

Visual Studio 2005 SP1 + GapiDraw 3.6b

Open: samples\win32\Simple\Simple.sln

Solution configuration: Release
Project->Properies->Configuration Properties->
->C/C++->Code Generation->RunTime Library: Multi-thread (/MT)
->Linker->Additional Library Directories: ../../../../lib/vs2005-pc


Compile:

------ Build started: Project: Simple, Configuration: Release Win32 ------
Compiling...
GapiApplication.cpp
Linking...
MSVCRT.lib(MSVCR80.dll) : error LNK2005: _malloc already defined in LIBCMT.lib(malloc.obj)
MSVCRT.lib(MSVCR80.dll) : error LNK2005: _free already defined in LIBCMT.lib(free.obj)
MSVCRT.lib(MSVCR80.dll) : error LNK2005: _strncmp already defined in LIBCMT.lib(strncmp.obj)
MSVCRT.lib(MSVCR80.dll) : error LNK2005: _fflush already defined in LIBCMT.lib(fflush.obj)
MSVCRT.lib(MSVCR80.dll) : error LNK2005: _fclose already defined in LIBCMT.lib(fclose.obj)
MSVCRT.lib(MSVCR80.dll) : error LNK2005: _abort already defined in LIBCMT.lib(abort.obj)
MSVCRT.lib(MSVCR80.dll) : error LNK2005: ___iob_func already defined in LIBCMT.lib(_file.obj)
MSVCRT.lib(MSVCR80.dll) : error LNK2005: _calloc already defined in LIBCMT.lib(calloc.obj)
MSVCRT.lib(ti_inst.obj) : error LNK2005: "private: __thiscall type_info::type_info(class type_info const &)" (??0type_info@@AAE@ABV0@@Z) already defined in LIBCMT.lib(typinfo.obj)
MSVCRT.lib(ti_inst.obj) : error LNK2005: "private: class type_info & __thiscall type_info::operator=(class type_info const &)" (??4type_info@@AAEAAV0@ABV0@@Z) already defined in LIBCMT.lib(typinfo.obj)
LINK : warning LNK4098: defaultlib 'MSVCRT' conflicts with use of other libs; use /NODEFAULTLIB:library
C:\Windows CE Tools\GapiDraw\samples\win32\Simple\vs2005-pc\Release\Simple.exe : fatal error LNK1169: one or more multiply defined symbols found
Build log was saved at "file://c:\Windows CE Tools\GapiDraw\samples\win32\Simple\vs2005-pc\Release\BuildLog.htm"
Simple - 11 error(s), 1 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========


When I try to set linker option: /NODEFAULTLIB:"LIBCMT.lib"

Compile fine, but don't work at mashine where not instaled 'vcredist_x86.exe' (MSVSRT80.dll,...)....

P.S. And my project (aslo used librarys: eXpat, FreeType) at WinCE work fine. At Win32 now requires 'vcredist_x86.exe'. :(

PostPosted: Jun 8, 2007 @ 6:58pm
by wprintf

PostPosted: Jun 8, 2007 @ 7:56pm
by Antony

PostPosted: Jun 9, 2007 @ 5:48am
by wprintf

PostPosted: Jun 9, 2007 @ 8:55am
by wprintf
From GapiDraw team only required also compile win32 version with: Project->Properies->Configuration Properties->
->C/C++->Code Generation->RunTime Library: Multi-thread (/MT)

PostPosted: Jun 9, 2007 @ 5:54pm
by Antony
My point is that VS2005 will always link to the version 8 C runtime dll if code requires the C runtime.

Either the sample code or GapiDraw needs the C runtime to function in this scenario.

PostPosted: Jun 18, 2007 @ 5:45am
by Mapman
Isn't this the problem with multiple definitions that can be settled by including the linker option: "/FORCE:MULTIPLE"

Have a look at this post: http://www.pocketmatrix.com/forums/view ... e+multiple

PostPosted: Jun 18, 2007 @ 11:10am
by wprintf