PocketMatrix forums

A read-only archive of the PocketMatrix forums (2001–2014). Posting and accounts are closed.

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

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'. :(
Any support will be from developers?
Or our company has bought not supported product?
Yes that is correct you need the latest version 8 MSVCRT from Microsoft. It is a symptom of using the 2005 IDE.

You always needed earlier version of the same DLL with previous compilers but most machines would have them installed already. So you would not have noticed that they were required.

You can either build with an earlier compiler or ship the redistributable.
Antony wrote:Yes that is correct you need the latest version 8 MSVCRT from Microsoft. It is a symptom of using the 2005 IDE.

You always needed earlier version of the same DLL with previous compilers but most machines would have them installed already. So you would not have noticed that they were required.

You can either build with an earlier compiler or ship the redistributable.


No. When I use other librarys, I set "Code Generation->RunTime Library: Multi-thread (/MT)" and MSVCRT80.DLL.... not needed for run program. RTL build in executable file.
From GapiDraw team only required also compile win32 version with: Project->Properies->Configuration Properties->
->C/C++->Code Generation->RunTime Library: Multi-thread (/MT)
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.
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
Mapman wrote: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


Yes, with "/FORCE:MULTIPLE" program is compiling fine (only warnings LNK4006). But program required MS Redistribute kit. :(

================
Dump of file TileDemo.exe

File Type: EXECUTABLE IMAGE

Section contains the following imports:

WINMM.dll
DDRAW.dll
KERNEL32.dll
USER32.dll
GDI32.dll
SHELL32.dll
ole32.dll
OLEAUT32.dll
MSVCR80.dll

================

At generated .exe I find mscoree.dll - 'signature' .NET framework :(

Are GapiDraw uses .NET framework????