If I download and build DCMTK 3.6.0, configure, and build Debug and Release, all is well.
My own Cmake file has the following:
target_link_libraries(${PROJECT_NAME} debug netapi32 debug ${DCMTK_oflog_LIBRARY} debug ${DCMTK_ofstd_LIBRARY} debug ${DCMTK_dcmdata_LIBRARY}
debug ${ITK_LIBRARIES}
debug ${VTK_LIBRARIES}
debug ${Qt5Widgets_LIBRARIES}
debug ${Qt5OpenGL_LIBRARIES}
debug ${Qt5Core_LIBRARIES} )
This works fine.
I add paths for the release libaries of DCMTK and re-configure my project with the following:
target_link_libraries(${PROJECT_NAME} optimized netapi32 optimized ${DCMTK_oflog_RELEASE_LIBRARY} optimized ${DCMTK_ofstd_RELEASE_LIBRARY} optimized ${DCMTK_dcmdata_RELEASE_LIBRARY}
optimized ${ITK_LIBRARIES}
optimized ${VTK_LIBRARIES}
optimized ${Qt5Widgets_LIBRARIES}
optimized ${Qt5OpenGL_LIBRARIES}
optimized ${Qt5Core_LIBRARIES} )
and I get:
>dcmdata.lib(dcdirrec.obj) : error LNK2019: unresolved external symbol "public: bool __cdecl log4cplus::Logger::isEnabledFor(int)const " (?isEnabledFor@Logger@log4cplus@@QEBA_NH@Z) referenced in function "public: virtual class OFCondition __cdecl DcmDirectoryRecord::insertSub(class DcmDirectoryRecord *,unsigned long,bool)" (?insertSub@DcmDirectoryRecord@@UEAA?AVOFCondition@@PEAV1@K_N@Z)
Is the release library(s) missing log4cplus? Or what might be the problem?
Thanks
Rick
static lib builds in Release mode Visual Studio 2012
Moderator: Moderator Team
-
- DCMTK Developer
- Posts: 2506
- Joined: Tue, 2011-05-03, 14:38
- Location: Oldenburg, Germany
- Contact:
Re: static lib builds in Release mode Visual Studio 2012
Maybe, the order of libraries is significant for your compiler/linker. dcmdata depends on oflog and oflog depends on ofstd.
... or the calling convention (__cdecl, __stdcall, or __fastcall) differs on the use of the function declaration and the function definition, which is probably the result of an incompatible setting for code generation (/MT vs. /MD).
... or the calling convention (__cdecl, __stdcall, or __fastcall) differs on the use of the function declaration and the function definition, which is probably the result of an incompatible setting for code generation (/MT vs. /MD).
Who is online
Users browsing this forum: No registered users and 1 guest