dtmtk compilation on windows 7 with MINGW64

Compilation and installation of DCMTK

Moderator: Moderator Team

Post Reply
Message
Author
d2
Posts: 14
Joined: Wed, 2011-06-08, 14:39
Location: France

dtmtk compilation on windows 7 with MINGW64

#1 Post by d2 »

Hi all,

I recently manage to compile dcmtk 3.6.0 with MING64.

Here is the "how to":

1- use cmake for windows, and choose mingw makefiles

2- edit ofstd/include/dcmtk/ofstd/offile.h
line 199: replace:

Code: Select all

    #ifdef _WIN32
    file_ = _popen(command, modes);
    #else
    file_ = :: popen(command, modes);
    #endif
by:

Code: Select all

    //#ifdef _WIN32
    //file_ = _popen(command, modes);
    //#else
    file_ = :: popen(command, modes);
    //#endif
line 261: replace:

Code: Select all

	#ifdef _WIN32
	result = _pclose(file_);
	#else
        result = :: pclose(file_);
	#endif
by:

Code: Select all

	//#ifdef _WIN32
	//result = _pclose(file_);
	//#else
        result = :: pclose(file_);
	//#endif
3- edit dcmnet/libsrc/dul.cc
line 1773: replace:

Code: Select all

                sprintf(buf, "%i", OFreinterpret_cast(int, childSocketHandle));
by:

Code: Select all

                sprintf(buf, "%i", OFreinterpret_cast(INT64, childSocketHandle));
line 1783: replace:

Code: Select all

                       << ", socketHandle " << OFreinterpret_cast(int, childSocketHandle) << OFStringStream_ends;
by:

Code: Select all

                       << ", socketHandle " << OFreinterpret_cast(INT64, childSocketHandle) << OFStringStream_ends;
4- run make-ming32 and this should work

Hope this will help someone...

J. Riesmeier
DCMTK Developer
Posts: 2501
Joined: Tue, 2011-05-03, 14:38
Location: Oldenburg, Germany
Contact:

#2 Post by J. Riesmeier »

Thank you for letting us know. MINGW64 was not on the list of tested systems for the DCMTK 3.6.0 release. See INSTALL file for details.

Post Reply

Who is online

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