DICOM @ OFFIS

Discussion Forum for OFFIS DICOM Tools - For registration, send email with desired user name to the OFFIS DICOM team
It is currently Fri, 2017-11-17, 18:17

All times are UTC + 1 hour




Post new topic Reply to topic  [ 1 post ] 
Author Message
PostPosted: Tue, 2004-11-09, 09:31 
Offline
OFFIS DICOM Team
OFFIS DICOM Team

Joined: Tue, 2004-11-02, 17:22
Posts: 1208
Location: Oldenburg, Germany
:?: I am developing an application on Microsoft Visual C++ (MSVC) that uses DCMTK. When I try to compile and link my application against the DCMTK libraries, the linker fails with error LNK2005 and reports warning LNK4098, e.g.
Code:
LIBCMTD.lib(dbgheap.obj) : error LNK2005: _malloc already defined in MSVCRTD.lib(MSVCRTD.dll)
LINK : warning LNK4098: defaultlib "LIBCMTD" conflicts with use of other libs; use /NODEFAULTLIB:library

:!: The problem is that the linker tries to combine different, incompatible versions of the Visual C++ runtime library into a single binary. This happens when not all parts of your project and the libraries you link against are generated with the same code generation options in Visual C++. Do not use the /NODEFAULTLIB workaround, because strange software crashes may follow. Fix the problem!

DCMTK is by default compiled with the "Multithreaded" or "Multithreaded Debug" code generation option (the latter for Debug mode). Either change the project settings of all of your code to use these code generation options, or change the code generation for all DCMTK modules and re-compile. MFC users beware: DCMTK should be compiled with "Multithreaded DLL" or "Multithreaded DLL Debug" settings if you want to link the libraries into an MFC application.

Note: You can change the code generation options centrally in file dcmtk/CMakeLists.txt by replacing "/MT" with "/MD" and "/MTd" with "/MDd". You then have to run CMake to create new project files for the complete DCMTK toolkit. If you do this change, however, please note that you also have to provide all external libraries (zlib, openssl etc.) in pre-compiled versions generated with "/MD" or "/MDd". Alternatively, you can disable the use of this external libraries in CMake.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 1 post ] 

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group