Problem solved

Compilation and installation of DCMTK

Moderator: Moderator Team

Post Reply
Message
Author
cgraus
Posts: 12
Joined: Wed, 2005-08-24, 22:56
Location: Australia

Problem solved

#1 Post by cgraus »

It seems that DCMTK was building the replacement class for std::string, and I also needed to add some other linker settings to make it work. None of this was covered in the FAQ, so I'm posting again just in case anyone else gets stuck. I've set the forum to let me know if anyone replies - given that I had to work this out for myself, I'm happy to help anyone else stuck with having to use this library in VC2005.

Thomas Wilkens
DCMTK Developer
Posts: 117
Joined: Tue, 2004-11-02, 17:21
Location: Oldenburg, Germany
Contact:

#2 Post by Thomas Wilkens »

We would be more than happy to read all of your experiences in detail. Your descriptions are very probably of help to many other people, so we could also move them to the FAQ if you dont mind.

The amount of people switching from VC++ 6.0 to VS 2005 is getting bigger every day, so corresponding questions will definitely be asked. Please share your experiences with us.

cgraus
Posts: 12
Joined: Wed, 2005-08-24, 22:56
Location: Australia

#3 Post by cgraus »

Sure thing - glad to help.

In essence, I've gone around in circles for over a week on this ( as visible by my questions below ), until one of the Microsoft C++ compiler authors helped me out by looking at the output and telling me exactly what was going wrong. I had assumed I couldn't be linking to two versions of the STL, as all my code was building with /MD, and there is only one STL in VC2005 ( no iostream.h, etc anymore ). I'd assumed any different versions were coming from different threading models, and as the project I am working on is new to me and links to a lot of other libraries, I was wondering if one of them was causing the error. However, after talking to this guy, I decided the problem was somewhere in DCMTK, and started to dig deeper into the project itself ( up to now, I'd been working on the build settings alone )

DCMTK has a project called ofstd, which seems to be replacements for the standard library, for older compilers. One of these, ofstring, is wrapped in an #ifdef for HAVE_STD_STRING, but HAVE_STD_STRING is never defined in the cfwin32.h file, which is where ofstd gets configured for windows. I added the #define at the top of this file, rebuilt everything, and then it linked without error.

Post Reply

Who is online

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