Link error VS12, single shared library

Compilation and installation of DCMTK

Moderator: Moderator Team

Post Reply
Message
Author
lars_matthaeus
Posts: 4
Joined: Fri, 2013-11-15, 14:34

Link error VS12, single shared library

#1 Post by lars_matthaeus »

I'm trying to build the git nightly version with Visual Studio 2013 (aka Visual Studion 12) as a 32 bit version. All compiles fine, but I get two linker errors at the end of the build process:

Error 100 error LNK1181: cannot open input file 'ofstd.lib' I:\dcmtk-devel\bin_vs12_x86\dcmdata\libsrc\LINK mkdeftag
Error 102 error LNK1181: cannot open input file 'ofstd.lib' I:\dcmtk-devel\bin_vs12_x86\dcmdata\libsrc\LINK mkdictbi

As cmake settings, I disabled all optional items (I also played around with the settings a bit, but no help):

BUILD_APPS:BOOL=OFF
BUILD_SHARED_LIBS:BOOL=ON
BUILD_SINGLE_SHARED_LIBRARY:BOOL=ON
DCMTK_WIDE_CHAR_FILE_IO_FUNCTIONS:BOOL=OFF
DCMTK_WIDE_CHAR_MAIN_FUNCTION:BOOL=OFF
DCMTK_WITH_DOXYGEN:BOOL=OFF
DCMTK_WITH_ICONV:BOOL=OFF
DCMTK_WITH_OPENSSL:BOOL=OFF
DCMTK_WITH_PNG:BOOL=OFF
DCMTK_WITH_PRIVATE_TAGS:BOOL=OFF
DCMTK_WITH_SNDFILE:BOOL=OFF
DCMTK_WITH_THREADS:BOOL=OFF
DCMTK_WITH_TIFF:BOOL=OFF
DCMTK_WITH_XML:BOOL=OFF
DCMTK_WITH_ZLIB:BOOL=OFF

Any ideas?
Lars

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

Re: Link error VS12, single shared library

#2 Post by J. Riesmeier »

Yes, I have an idea but did not test it yet: in "dcmdata/libsrc/CMakeLists.txt" the calls of "ADD_EXECUTABLE()" and "TARGET_LINK_LIBRARIES()" should probably be replaced by their "DCMTK_...()" variants, because the first one checks whether BUILD_APPS is ON or OFF. I'm not sure about the second one.

Here's the commit that probably causes the problems: http://git.dcmtk.org/web?p=dcmtk.git;a= ... e49c14eca9

I'm sorry, but I have no VS available right now to test it...

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

Re: Link error VS12, single shared library

#3 Post by J. Riesmeier »

The issue should be fixed now. Thank you for reporting!

lars_matthaeus
Posts: 4
Joined: Fri, 2013-11-15, 14:34

Re: Link error VS12, single shared library

#4 Post by lars_matthaeus »

Confirmed, the issue is indeed solved in the latest nightly version.
Thanks for fixing this so quickly!!!

PS: The fix solved also the build errors for the "no-single shared library build", see viewtopic.php?f=3&t=3858.

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest