Using DCMTK with C++/CLI

Compilation and installation of DCMTK

Moderator: Moderator Team

Post Reply
Message
Author
dalingrin
Posts: 8
Joined: Fri, 2010-05-21, 01:38

Using DCMTK with C++/CLI

#1 Post by dalingrin »

I have DCMTK compiled with /MD and /MDd using the native visual c++ 2008 compilers. I am trying to #include dctk.h in a new C++/CLI Windows Form application. The application is the regular Windows Form template with nothing else changed except that I set up the linker for the DCMTK libraries.

With the addition of "#include "dcmtk/dcmdata/dctk.h" the program still compiles fine without any warnings but immediately upon execution I get a runtime exception "Debug Assertion Failed."
Specifically the error says "Expression:_CrtIsValidHeapPointer(pUserData)."

I get this error with only the above #include directive. I haven't declared any objects and the like.

Anyone have any ideas?

dalingrin
Posts: 8
Joined: Fri, 2010-05-21, 01:38

#2 Post by dalingrin »

Adding "__DllMainCRTStartup@12" to the "force symbol references" entry in the linker solved this problem for me.

Chung-Yueh Lien
Posts: 61
Joined: Wed, 2010-05-19, 09:27
Location: Taipei, Taiwan

#3 Post by Chung-Yueh Lien »

is operation system x64 platform ?

dalingrin
Posts: 8
Joined: Fri, 2010-05-21, 01:38

#4 Post by dalingrin »

Yes it is an x64 operating system. Though I am compiling for 32 bit.

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest