Hi all,
Here's a problem I have with using DCMTK library in a 64bit Windows Forms Application running on Windows 7. I would much appreciate any help, feedback, hint, etc.
Problem:
Runtime Error when using DCMTK library in a 64bit Windows Forms Application (created with Visual Studio)
Steps to reproduce:
1. Build dcmtk-3.6.0 project for x64 platform.
- I change all \MT to \MD in C:\dcmtk-3.6.0-64\CMakeLists.txt before buildling.
2. Using Microsoft Visual Studio 2008, create a new Windows Forms Application Project.
- from Configuration Manager set the platform for the whole solution to be x64.
- set Project Properties -> Configuration Properties -> General -> Common Language Runtime Support = /clr
- set Project Properties -> Configuration Properties -> C/C++ -> General -> Additional Include Directories = "C:\dcmtk-3.6.0-64\DIST\include;"
- set Project Properties -> Configuration Properties -> Linker -> General -> Additional Library Directories = "C:\dcmtk-3.6.0-64\DIST\lib;"
- set Project Properties -> Configuration Properties -> Linker -> Input -> Additional Dependencies = kernel32.lib user32.lib gdi32.lib winspool.lib shell32.lib ole32.lib oleaut32.lib uuid.lib comdlg32.lib advapi32.lib dcmdata.lib oflog.lib ofstd.lib ws2_32.lib netapi32.lib wsock32.lib dcmimgle.lib $(NOINHERIT)
- Add these lines to stdafx.h:
#include "dcmtk/dcmdata/dcdeftag.h"
#include "dcmtk/dcmdata/dcfilefo.h"
#include "dcmtk/dcmdata/dcmetinf.h"
#include "dcmtk/dcmimgle/dcmimage.h"
3. Build the solution - it should be successful.
4. Execute the exe file.
Result:
Runtime error occurs. Screenshot is attached here.
Isolation & Additional information:
1. Creating Windows x64 Console Application Project with identical settings and dependencies runs fine in runtime.
2. Creating Windows Application Forms x32 project with alanogous settings and corresponding x32 dependencies also runs fine in runtime.
3. Removing the four dcmtk include lines from the project desribed in Steps to reproduce makes and recompiling makes it working in runtime (without using the library)...
Environment:
I checked everything above on two different Intel i7 x64 machines with Windows 7. I used Microsoft Visual Studio 2008.
I would enjoy using the DCMTK library in a x64 Windows GUI application, if I find a way to.
Regards, Simeon
Runtime Error when using DCMTK library in a 64bit Windows Forms Application
Moderator: Moderator Team
-
- Posts: 3
- Joined: Wed, 2011-11-30, 20:17
-
- DCMTK Developer
- Posts: 2072
- Joined: Fri, 2004-11-05, 13:47
- Location: Oldenburg, Germany
- Contact:
Hi,
just googled the event ID, here are some ideas what may be the problem. One is for example that the NET2.0 framework has to be installed; there are many more suggestions, seems to be a very generic error
Good luck,
Michael
just googled the event ID, here are some ideas what may be the problem. One is for example that the NET2.0 framework has to be installed; there are many more suggestions, seems to be a very generic error
Good luck,
Michael
-
- Posts: 3
- Joined: Wed, 2011-11-30, 20:17
-
- DCMTK Developer
- Posts: 120
- Joined: Thu, 2009-11-26, 08:15
-
- Posts: 3
- Joined: Wed, 2011-11-30, 20:17
Hi Uli,
Thanks for your reply in the topic. I'm not very experienced in Windows runtime errors, so, unfortunately, I cannot explain any further on the essence of the error. Anyway, I'm curious if anybody else reproduces it, following the steps to reproduce - it may be a specific setting issue on my side...
However, what I did was from Configuration Manager in VS to set the Active solution configuration from Release to Debug. I used the very same project from the 'steps to reproduce' section. Now when I start the process that includes the DCMTK libraries, the process hangs. Maybe a debugger can be connected to it, but I don't know how...
As for now the 32bit build works, I will hopefully spend more time in researching the 64bit build possibility as far as I finish the other parts of the project.
Thanks for making me notes and regards,
Simeon
Thanks for your reply in the topic. I'm not very experienced in Windows runtime errors, so, unfortunately, I cannot explain any further on the essence of the error. Anyway, I'm curious if anybody else reproduces it, following the steps to reproduce - it may be a specific setting issue on my side...
However, what I did was from Configuration Manager in VS to set the Active solution configuration from Release to Debug. I used the very same project from the 'steps to reproduce' section. Now when I start the process that includes the DCMTK libraries, the process hangs. Maybe a debugger can be connected to it, but I don't know how...
As for now the 32bit build works, I will hopefully spend more time in researching the 64bit build possibility as far as I finish the other parts of the project.
Thanks for making me notes and regards,
Simeon
Who is online
Users browsing this forum: Ahrefs [Bot] and 1 guest