[vtkusers] DCMTK + VTK or ITK

madness78 madness78 at pusan.ac.kr
Sat Mar 27 04:51:09 EDT 2010


I'm trying to compile DCMTK with VTK or ITK.
There are no problem compling DCMTK and VTK indivisually.

Howere, together, there is a error like below..


Debug Assertion Failed
Program:...aging
..
File:f\dd\vctools\vc7libs\ship\atlmfc\include\afxwin1.inl
Line 21


Below is my CMakLists...
Is there any problem? Please help me!!
////////////////////////////////////////////////////////////////////////////

PROJECT(VOXA_Ver_2)

cmake_minimum_required(VERSION 2.8)

# set DCMTK Source directory 
FIND_PACKAGE(DCMTK)


FIND_PACKAGE(VTK)
IF(NOT VTK_DIR)
  MESSAGE(FATAL_ERROR "Please set VTK_DIR.")
ENDIF(NOT VTK_DIR)
INCLUDE(${VTK_USE_FILE})


# set certain project wide flags 
SET(CMAKE_C_FLAGS "" CACHE STRING "Flags for C compiler." FORCE) 
SET(CMAKE_C_FLAGS_DEBUG "/nologo /MD /W3 /GX /Z7 /Od /GR- /YX" CACHE STRING
"Win32 Debug Options C Code" FORCE) 
SET(CMAKE_C_FLAGS_RELEASE "/nologo /MD /W3 /GX /O2 /GR- /YX" CACHE STRING
"Win32 Release Options C Code" FORCE) 
SET(CMAKE_CXX_FLAGS "" CACHE STRING "Flags used by the compiler during all
build types." FORCE) 
SET(CMAKE_CXX_FLAGS_DEBUG "/nologo /MD /W3 /GX /Z7 /Od /GR- /YX" CACHE
STRING "Win32 Debug Options C++ Code" FORCE) 
SET(CMAKE_CXX_FLAGS_RELEASE "/nologo /MD /W3 /GX /O2 /GR- /YX" CACHE STRING
"Win32 Release Options C++ Code" FORCE) 
SET(CMAKE_EXE_LINKER_FLAGS "/INCREMENTAL:NO" CACHE STRING "Win32 Linker
Flags" FORCE) 


# set _REENTRANT flag 
ADD_DEFINITIONS(-D_REENTRANT) 

# declare include directories 
INCLUDE_DIRECTORIES(
	C:/DCMTK/dcmtk-3.5.4/dcmtk-3.5.4/config/include
	C:/DCMTK/dcmtk-3.5.4/dcmtk-3.5.4/ofstd/include
	C:/DCMTK/dcmtk-3.5.4/dcmtk-3.5.4/dcmdata/include
	C:/DCMTK/dcmtk-3.5.4/dcmtk-3.5.4/dcmimgle/include
	C:/DCMTK/dcmtk-3.5.4/dcmtk-3.5.4/dcmimage/include
	C:/DCMTK/dcmtk-3.5.4/dcmtk-3.5.4/dcmjpeg/include	
) 

# declare directories containing used libraries 
LINK_DIRECTORIES(
	C:/DCMTK/dcmtk-3.5.4/dcmtk_binary/ofstd/libsrc/Debug
	C:/DCMTK/dcmtk-3.5.4/dcmtk_binary/dcmdata/libsrc/Debug	
	C:/DCMTK/dcmtk-3.5.4/dcmtk_binary/dcmimgle/libsrc/Debug 
	C:/DCMTK/dcmtk-3.5.4/dcmtk_binary/dcmimage/libsrc/Debug 
	C:/DCMTK/dcmtk-3.5.4/dcmtk_binary/dcmjpeg/libsrc/Debug
) 


SET(VOXA_Ver_2_SRCS
	VOXA_Ver_2.ncb
	VOXA_Ver_2.sln
	VOXA_Ver_2/MainFrm.cpp
	VOXA_Ver_2/MainFrm.h
	VOXA_Ver_2/Resource.h
	VOXA_Ver_2/stdafx.h
	VOXA_Ver_2/stdafx.cpp
	VOXA_Ver_2/targetver.h
	VOXA_Ver_2/VOXA_Ver_2.h
	VOXA_Ver_2/VOXA_Ver_2.cpp
	VOXA_Ver_2/VOXA_Ver_2.rc
	VOXA_Ver_2/VOXA_Ver_2.vcproj
	VOXA_Ver_2/VOXA_Ver_2Doc.h
	VOXA_Ver_2/VOXA_Ver_2Doc.cpp
	VOXA_Ver_2/VOXA_Ver_2View.h
	VOXA_Ver_2/VOXA_Ver_2View.cpp
	VOXA_Ver_2/res/Toolbar.bmp
	VOXA_Ver_2/res/VOXA_Ver_2.ico
	VOXA_Ver_2/res/VOXA_Ver_2.rc2
	VOXA_Ver_2/res/VOXA_Ver_2Doc.ico
	
)
# declare executables 
ADD_EXECUTABLE(VOXA_Ver_2 WIN32 ${VOXA_Ver_2_SRCS}) 

# make sure executables are linked to the corresponding libraries 
# dcmdump 

TARGET_LINK_LIBRARIES(
	VOXA_Ver_2
	netapi32 
	wsock32 
	ofstd 
	dcmdata 
	dcmimage
	dcmimgle
	dcmjpeg
	
	
	vtkMFC
	vtkVolumeRendering
	vtkRendering 
	vtkGraphics 
	vtkImaging 
	vtkIO 
	vtkFiltering 
	vtkCommon 
	vtkHybrid
) 

ADD_DEFINITIONS(-D_AFXDLL)
SET(CMAKE_MFC_FLAG 6)


# recurse into subdirectories 
#SUBDIRS(libsrc apps) 


-- 
View this message in context: http://old.nabble.com/DCMTK-%2B-VTK-or-ITK-tp28050954p28050954.html
Sent from the VTK - Users mailing list archive at Nabble.com.




More information about the vtkusers mailing list