VS2017 compile issue

All other questions regarding DCMTK

Moderator: Moderator Team

Post Reply
Message
Author
Lakeeast
Posts: 2
Joined: Wed, 2017-12-06, 09:59

VS2017 compile issue

#1 Post by Lakeeast »

I am a new user of DcmTK, and have recently looked into using DcmTK for a medical imaging project. I was able to compile the code on Mac and Linux successfully. But when I tried to open up the project using Visual Studio 2017, I got the following error:


Error LNK2019 unresolved external symbol u_errorName_57 referenced in function "public: class OFCondition __cdecl OFCharacterEncoding::Implementation::convert(class OFString &,char const *,unsigned __int64)" (?convert@Implementation@OFCharacterEncoding@@QEAA?AVOFCondition@@AEAVOFString@@PEBD_K@Z) C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\Common7\IDE\CMakeLists.txt C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\Common7\IDE\ofstd.lib(ofchrenc.cc.obj) 1

As a note, I am using Visual Studio 2017's new feature of directing opening up a folder (vs. run cmake to generate .sln). Do you know how to resolve the problem?

Thanks!

Michael Onken
DCMTK Developer
Posts: 2048
Joined: Fri, 2004-11-05, 13:47
Location: Oldenburg, Germany
Contact:

Re: VS2017 compile issue

#2 Post by Michael Onken »

Hi,

we do not support this new VS 2017 feature but only the CMake -> sln process. CMake does perform some tests on your system to check for 3rd party libraries and other stuff, which it then writes to DCMTK's osconfig.h which reflects your system/compiler capabilities and configuration then. Can you please try the regular CMake process?

Out of curiosity: Do you have a link at hand describing the VS feature you are referring to? Maybe this is something we can address in the future.

Best,
Michael

P.S: Is it the VS 2017 CMake feature described here?

Lakeeast
Posts: 2
Joined: Wed, 2017-12-06, 09:59

Re: VS2017 compile issue

#3 Post by Lakeeast »

I tried to create .sln from CMAKE, and had the same link error related to ofstd.

VS 2017's "open directory" feature can indeed be found at https://blogs.msdn.microsoft.com/vcblog ... al-studio/. It would be great if dcmtk can work with it.

Thanks for your help!

Michael Onken
DCMTK Developer
Posts: 2048
Joined: Fri, 2004-11-05, 13:47
Location: Oldenburg, Germany
Contact:

Re: VS2017 compile issue

#4 Post by Michael Onken »

Probably they (VS) also only run cmake in the background based on our project files, so this should work out of the box, too (did not try it though).

Did you enable the i2d library in CMake, or libiconv? If so, you would have to get and link against the related libraries.

Best,
Michael

Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot] and 1 guest