Cmakelist.txt of 3.6.1 missing Platform-specific settings

Compilation and installation of DCMTK

Moderator: Moderator Team

Message
Author
Roadrunner
Posts: 56
Joined: Mon, 2010-06-14, 16:41

Re: Cmakelist.txt of 3.6.1 missing Platform-specific setting

#16 Post by Roadrunner »

This option is on/true by default and was/is in the old releases/snapshots too.
So this was not a problem in the past with the snapshots since the last stable release.

Frank

J. Riesmeier
DCMTK Developer
Posts: 2505
Joined: Tue, 2011-05-03, 14:38
Location: Oldenburg, Germany
Contact:

Re: Cmakelist.txt of 3.6.1 missing Platform-specific setting

#17 Post by J. Riesmeier »

This is really strange...

The code generation settings for the VS compiler were always hardcoded (to MT/MTd) in DCMTK's CMake files. We introduced the abovementioned option to allow users to disable this "overwriting" and let CMake determine the appropriate settings (that can then be adjusted on the user interface).

I can remember that for the DCMTK 3.6.0 release the "overwriting" did not work with 64-bit versions of VS (Win64), but this has been fixed later...

kamil
Posts: 63
Joined: Fri, 2009-04-17, 09:18

Re: Cmakelist.txt of 3.6.1 missing Platform-specific setting

#18 Post by kamil »

Roadrunner wrote:Found the solotion:

in the file dcmtkPrepare.cmake are some /MT options which i changed from /MT to /MD and everything works like a charm.

Btw: I don't know why but the cmake gui shows me /MD on the compiler flags while the option was /MT ( in the file). It seems to me if cmake generates the project file it considered the option in the dcmtkPrepare.cmake.
So maybe someone could change this in the git repository (and therefore next release/snapshot) in the next few days.
Thanks

Btw2: I removed the #undef UNICODE pre processor line - so all files (except the cmake file) are original.

Frank
I failed with your approach, seems dcmtk does not support compiling with Unicode character set.

J. Riesmeier
DCMTK Developer
Posts: 2505
Joined: Tue, 2011-05-03, 14:38
Location: Oldenburg, Germany
Contact:

Re: Cmakelist.txt of 3.6.1 missing Platform-specific setting

#19 Post by J. Riesmeier »

No, of course, not. Didn't you read my previous postings?
Are you compiling with UNICODE defined? This is (and, actually, never was) supported by the DCMTK. There's also a section on this in the INSTALL file:

Code: Select all

5. DCMTK does not compile when UNICODE or _UNICODE is defined because the
   VisualStudio compiler then uses the Unicode version instead of the ANSI
   version for all Windows API functions (i.e. type wchar_t instead of char
   for all character string parameters and return values).

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest