Linker Error Related to fileformat.loadFile(...) - dcmtk_d?

All other questions regarding DCMTK

Moderator: Moderator Team

Post Reply
Message
Author
zanguzen
Posts: 8
Joined: Mon, 2007-07-09, 22:17

Linker Error Related to fileformat.loadFile(...) - dcmtk_d?

#1 Post by zanguzen »

Hey sorry once more but I decided to try running the example code where you get the patient's name using a DcmFileFormat object, but then I get the LNK2019 error. Apparently, that means I'm not using the additional linker directory that the code requires - in this case dcmdata.lib right?

Well, when I try to do that, I get all the MSCVRT linker-related errors which I couldn't solve using the FAQ. Furthermore, this entire time I've been using the directory dcmtk_d.lib in my additional directories, and yet I've noticed that nowhere on this board or on the internet can I find info about it. In fact, the only way I got it was from a previous project made a couple years ago by a colleague. Can anyone fill me in on what dcmtk_d.lib is and if I should be using it? Thanks so much for any help - I'm really new and trying to figure the DCMTK out.
________
Balance (lexus)
Last edited by zanguzen on Mon, 2011-02-14, 02:16, edited 1 time in total.

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

#2 Post by Michael Onken »

Hi,

I don't know what dcmtk_d.lib lib is but I guess you won't need it :wink:
DCMTK consists of more than one library (file). Nearly each module (say: directory) in the source code will build it's own library. Most probably you don't link the correct libraries or you do not link them at all. Please take a look into the FAQ where the library dependencies are listed:

FAQ #27

If you tried and you can't find a solution post your compiler's error message (please only the necessary part as short as possible).

Regards
Michael

zanguzen
Posts: 8
Joined: Mon, 2007-07-09, 22:17

#3 Post by zanguzen »

Problem solved thank you very much! The problem was in fact that I was running my console app in debug mode even though DCMTK was being generated in MT. I switched to release mode and generated through MT, and now everything is fine. Thanks so much once again!
________
IPAD ACCESSORIES
Last edited by zanguzen on Wed, 2011-03-16, 15:43, edited 2 times in total.

Marco Eichelberg
OFFIS DICOM Team
OFFIS DICOM Team
Posts: 1459
Joined: Tue, 2004-11-02, 17:22
Location: Oldenburg, Germany
Contact:

#4 Post by Marco Eichelberg »

Welcome to the wonderful world of the many versions of the MSVC runtime. Make sure that ALL parts of your project (including all libraries you are linking) have been generated with the same code generation options (/MT) and make sure that you do NOT define a preprocessor symbol such as _DEBUG somewhere.

Post Reply

Who is online

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