some conflicts when building a project

All other questions regarding DCMTK

Moderator: Moderator Team

Post Reply
Message
Author
whqyy
Posts: 11
Joined: Fri, 2006-02-10, 09:46

some conflicts when building a project

#1 Post by whqyy »

Hi!

I tried to build a console project using dcmtk in vs2005. It worked well.

But now I am working on a MFC project. When building it, there is an error, as follows:

fatal error C1189: #error : Please use the /MD switch for _AFXDLL builds

What can I do then?

Thank you.

Yingyi

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

Re: some conflicts when building a project

#2 Post by Michael Onken »

Hi,
whqyy wrote:
fatal error C1189: #error : Please use the /MD switch for _AFXDLL builds

What can I do then?
It seems your program uses a library called AFX (I'm not familiar with this one...) . /MD is a compiler option dealing with multithread functionality. As I interpret this message, you have to add /MD to the compiler switches in your Visual Studio Project Settings. Be sure, DCMTK is compiled with /MD (instead of /MT), too. For DCMTK you can toggle this behaviour using CMake. Perhaps this hint might help, if configuration of this flag using CMake does not work:
viewtopic.php?t=646

Regards,
Michael

whqyy
Posts: 11
Joined: Fri, 2006-02-10, 09:46

#3 Post by whqyy »

I change the cmakelist.txt, and everything goes well.
:)

Thank you

Post Reply

Who is online

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