How to compile dmctk3.6.0 with support libraries
Moderator: Moderator Team
How to compile dmctk3.6.0 with support libraries
Hi, I'm a newbie. I used cmake 2.8.4 to create a VS2008 project. At first I create project with default options (/MDd or /MD) without supported libraries in cmake, and compiled dcmtk in VS2008 succesfully. but When I modified the project with supported libraries(downloaded pre-compiled package with /MD:dcmtk-3.6.0-win32-i386-support_MD.zip right?) and compiled in VS2008, it show some errors just like FAQ #26. What's wrong? What can I do next step? Thanks in advance.
-
- DCMTK Developer
- Posts: 2051
- Joined: Fri, 2004-11-05, 13:47
- Location: Oldenburg, Germany
- Contact:
Hi, Thanks!
I'm sure that I didn't touch anything when I opened the project by cmake-gui.exe, After I clicked the configure button the item of CMAKE_C_FLAGS_DEBUG and CMAKE_CXX_FLAGS_DEBUG = /D_DEBUG /MDd /Zi /Ob0 /Od /RTC1! Is it default options? And the CMakeCache.txt's content that in build path is same as above. It has the lines just like CMAKE_CXX_FLAGS_DEBUG:STRING=/D_DEBUG /MDd /Zi /Ob0 /Od /RTC1 and CMAKE_C_FLAGS_DEBUG:STRING=/D_DEBUG /MDd /Zi /Ob0 /Od /RTC1. I am really confused.
There is a lot of trouble for newbie. Please help me! Thanks a lot!
I'm sure that I didn't touch anything when I opened the project by cmake-gui.exe, After I clicked the configure button the item of CMAKE_C_FLAGS_DEBUG and CMAKE_CXX_FLAGS_DEBUG = /D_DEBUG /MDd /Zi /Ob0 /Od /RTC1! Is it default options? And the CMakeCache.txt's content that in build path is same as above. It has the lines just like CMAKE_CXX_FLAGS_DEBUG:STRING=/D_DEBUG /MDd /Zi /Ob0 /Od /RTC1 and CMAKE_C_FLAGS_DEBUG:STRING=/D_DEBUG /MDd /Zi /Ob0 /Od /RTC1. I am really confused.
There is a lot of trouble for newbie. Please help me! Thanks a lot!
-
- DCMTK Developer
- Posts: 2051
- Joined: Fri, 2004-11-05, 13:47
- Location: Oldenburg, Germany
- Contact:
Hey Ryan,
actually these flags are overriden by the "DCMTK_OVERWRITE_WIN32_COMPILER_FLAGS" which is enabled per default. You should only disable this if you set _all_ the compiler flags yourself on top of the CMake standard flags. So usually I can only recommend that to expert users.
So if you open visual studio, select a project like dcmdump and look into the property's Code Generation options, you see the compiler flags that are actually used for compiling. Per default, this is /MT and /MTd. But just be sure and check in Visual Studio.
If you really want /MD and /MDd instead, the best is to change all occurences of these flags in the CMakeLists.txt you find in the root directory.
Michael
actually these flags are overriden by the "DCMTK_OVERWRITE_WIN32_COMPILER_FLAGS" which is enabled per default. You should only disable this if you set _all_ the compiler flags yourself on top of the CMake standard flags. So usually I can only recommend that to expert users.
So if you open visual studio, select a project like dcmdump and look into the property's Code Generation options, you see the compiler flags that are actually used for compiling. Per default, this is /MT and /MTd. But just be sure and check in Visual Studio.
If you really want /MD and /MDd instead, the best is to change all occurences of these flags in the CMakeLists.txt you find in the root directory.
Michael
Who is online
Users browsing this forum: No registered users and 1 guest