mingw problems
Moderator: Moderator Team
-
- Posts: 10
- Joined: Thu, 2008-02-07, 11:20
mingw problems
dcmtk compile well with GNU Make 3.81, but with GNU Make 3.82.90 installed with QT5.1 show a lot of errors
i.e.
../../../LIBS/dcmtk-3.6.1_20121102/ofstd/include/dcmtk/ofstd/ofstd.h:651:23: error: expected unqualified-id before 'unsigned'
static int rand_r(unsigned int &seed);
that because in the file
C:\qt\qt5.1.1\tools\mingw48_32\i686-w64-mingw32\include\pthread.h : 462
#ifndef rand_r
#define rand_r(__seed) (__seed == __seed ? rand () : rand ())
#endif
../../../LIBS/dcmtk-3.6.1_20121102/ofstd/include/dcmtk/ofstd/offile.h:385:11: error: cannot convert 'bool' to 'FILE* {aka _iobuf*}' in assignment
file_ = _popen(command, modes);
maybe an explicit cast?
Is a patch for the new toolchain planned?
regards
i.e.
../../../LIBS/dcmtk-3.6.1_20121102/ofstd/include/dcmtk/ofstd/ofstd.h:651:23: error: expected unqualified-id before 'unsigned'
static int rand_r(unsigned int &seed);
that because in the file
C:\qt\qt5.1.1\tools\mingw48_32\i686-w64-mingw32\include\pthread.h : 462
#ifndef rand_r
#define rand_r(__seed) (__seed == __seed ? rand () : rand ())
#endif
../../../LIBS/dcmtk-3.6.1_20121102/ofstd/include/dcmtk/ofstd/offile.h:385:11: error: cannot convert 'bool' to 'FILE* {aka _iobuf*}' in assignment
file_ = _popen(command, modes);
maybe an explicit cast?
Is a patch for the new toolchain planned?
regards
-
- DCMTK Developer
- Posts: 2506
- Joined: Tue, 2011-05-03, 14:38
- Location: Oldenburg, Germany
- Contact:
Re: mingw problems
The first issue is a known one and should be fixed before the the next official DCMTK release.
Also the other issue will be fixed since MINGW is one of the platforms typically used during the cross-platform testing phase in the context of releasing a new version.
In fact, we already have a bug entry (#389) in our internal issue tracker that covers some of your problems...
I just increased the priority (i.e. target version) from "next release" to "one of the next snapshots". I hope this helps.
Also the other issue will be fixed since MINGW is one of the platforms typically used during the cross-platform testing phase in the context of releasing a new version.
In fact, we already have a bug entry (#389) in our internal issue tracker that covers some of your problems...
I just increased the priority (i.e. target version) from "next release" to "one of the next snapshots". I hope this helps.
-
- Posts: 10
- Joined: Thu, 2008-02-07, 11:20
Re: mingw problems
thank you for answer, and say hello to Oldenburg horse statue from me (maybe you have a picture of mine on it)
-
- DCMTK Developer
- Posts: 2506
- Joined: Tue, 2011-05-03, 14:38
- Location: Oldenburg, Germany
- Contact:
Re: mingw problems
Will doand say hello to Oldenburg horse statue from me
I saw the picture but it was my colleague Michael who took it (and who saw you on that horse ).(maybe you have a picture of mine on it)
-
- DCMTK Developer
- Posts: 2051
- Joined: Fri, 2004-11-05, 13:47
- Location: Oldenburg, Germany
- Contact:
Re: mingw problems
Remember it well... hope you return for a horse ride, it's still there waiting!
-
- Posts: 10
- Joined: Thu, 2008-02-07, 11:20
Re: mingw problems
hi everybody (especially to the horse)
any news about the patch? We can't use QT5 for that...
any news about the patch? We can't use QT5 for that...
-
- OFFIS DICOM Team
- Posts: 318
- Joined: Mon, 2014-03-03, 09:51
- Location: Oldenburg, Germany
Re: mingw problems
The problems regarding mingw should have been fixed in this commit:
http://git.dcmtk.org/web?p=dcmtk.git;a= ... 66bfa743f3
You might use the just released snapshot:
http://dicom.offis.de/download/dcmtk/sn ... 617.tar.gz
I use mingw to test dcmtk under windows quite often, so this should definitely work.
http://git.dcmtk.org/web?p=dcmtk.git;a= ... 66bfa743f3
You might use the just released snapshot:
http://dicom.offis.de/download/dcmtk/sn ... 617.tar.gz
I use mingw to test dcmtk under windows quite often, so this should definitely work.
-
- Posts: 10
- Joined: Thu, 2008-02-07, 11:20
Re: mingw problems
thank you, now I have some problems whith off64_t and fpos64_t definition, but I think is a mingw configuration problem...
-
- OFFIS DICOM Team
- Posts: 318
- Joined: Mon, 2014-03-03, 09:51
- Location: Oldenburg, Germany
Re: mingw problems
Could you give me more details about these problems? Maybe i can create a workaround.
FYI i use this mingw version:
http://sourceforge.net/projects/mingw-w ... z/download
FYI i use this mingw version:
http://sourceforge.net/projects/mingw-w ... z/download
-
- Posts: 10
- Joined: Thu, 2008-02-07, 11:20
Re: mingw problems
i downloaded qt5 for windows from http://qt-project.org/downloads
mingw is provided whith installation package
mingw32-make -v replies:
GNU Make 4.0.90
Built for Windows32
mingw is provided whith installation package
mingw32-make -v replies:
GNU Make 4.0.90
Built for Windows32
-
- Posts: 10
- Joined: Thu, 2008-02-07, 11:20
Re: mingw problems
ok, with mingw downloaded by sourceforge it compile... I think problem is in mingw provided with QT configuration
maybe in the solution is in the _mingw_off_t.h defines
maybe in the solution is in the _mingw_off_t.h defines
-
- OFFIS DICOM Team
- Posts: 318
- Joined: Mon, 2014-03-03, 09:51
- Location: Oldenburg, Germany
Re: mingw problems
It seems that i have identified the problem. Your QT-Version is 32 bit software and contains a 32 bit mingw. I've been working with a 64 bit mingw only so far, which was also true when i created the mingw fix. Looking at dcmtk/ofstd/include/dcmtk/ofstd/offile.h, lines 79, 384 and 448 you can see that !defined(__MINGW64__) is queried.
To my understanding, the fix was necessary for the 64 bit version of mingw only. As i understand it now, it's not about target architecture, but instead about which mingw distribution you use. QT uses the 32 bit version of the mingw-w64 project, which is different to the "regular" mingw 32 bit version and also needs the fix.
For now i would recommend patching the mentioned occurences of __MINGW64__ to __MINGW32__ in your local dcmtk version. I think it would be a bad idea to apply this fix to the public dcmtk, since it would possibly break the "regular" mingw distribution (although my personal opinion is that this version sucks and you should always use the mingw-w64 distribution, even for 32 bits [QT seems to be agreeing with me in this regard]).
I think i will create a configure test which will detect the right version to use in the near future, so it will work on any mingw distribution then.
To my understanding, the fix was necessary for the 64 bit version of mingw only. As i understand it now, it's not about target architecture, but instead about which mingw distribution you use. QT uses the 32 bit version of the mingw-w64 project, which is different to the "regular" mingw 32 bit version and also needs the fix.
For now i would recommend patching the mentioned occurences of __MINGW64__ to __MINGW32__ in your local dcmtk version. I think it would be a bad idea to apply this fix to the public dcmtk, since it would possibly break the "regular" mingw distribution (although my personal opinion is that this version sucks and you should always use the mingw-w64 distribution, even for 32 bits [QT seems to be agreeing with me in this regard]).
I think i will create a configure test which will detect the right version to use in the near future, so it will work on any mingw distribution then.
-
- Posts: 10
- Joined: Thu, 2008-02-07, 11:20
Re: mingw problems
GREAT... it compile...
thank you very much for the support
thank you very much for the support
-
- Posts: 10
- Joined: Thu, 2008-02-07, 11:20
Re: mingw problems
sorry again...
when I compile the library using makefiles generated by cmake there are no problems, but when I compile my project using makefiles generated by qmake there are compiler errors:
C:\LIBS\DCMTK\mingw32\include\dcmtk\oflog\tracelog.h:59: error: invalid conversion from 'const wchar_t*' to 'char' [-fpermissive]
logger.forcedLog(TRACE_LOG_LEVEL, DCMTK_LOG4CPLUS_TEXT("ENTER: ") + msg, file, line);
^
C:\LIBS\DCMTK\mingw32\include\dcmtk\oflog\tracelog.h:64: error: invalid conversion from 'const wchar_t*' to 'char' [-fpermissive]
logger.forcedLog(TRACE_LOG_LEVEL, DCMTK_LOG4CPLUS_TEXT("EXIT: ") + msg, file, line);
^
(the ^ is indented whith msg)
C:\LIBS\DCMTK\mingw32\include\dcmtk\oflog\logmacro.h:106: error: no matching function for call to 'dcmtk::log4cplus::Logger::getInstance(const tchar*&)'
return Logger::getInstance (logger);
^
I tried with
#pragma GCC diagnostic warning "-fpermissive"
but it don't patch the last error
maybe I have to set some gcc flag in the .pro file?
when I compile the library using makefiles generated by cmake there are no problems, but when I compile my project using makefiles generated by qmake there are compiler errors:
C:\LIBS\DCMTK\mingw32\include\dcmtk\oflog\tracelog.h:59: error: invalid conversion from 'const wchar_t*' to 'char' [-fpermissive]
logger.forcedLog(TRACE_LOG_LEVEL, DCMTK_LOG4CPLUS_TEXT("ENTER: ") + msg, file, line);
^
C:\LIBS\DCMTK\mingw32\include\dcmtk\oflog\tracelog.h:64: error: invalid conversion from 'const wchar_t*' to 'char' [-fpermissive]
logger.forcedLog(TRACE_LOG_LEVEL, DCMTK_LOG4CPLUS_TEXT("EXIT: ") + msg, file, line);
^
(the ^ is indented whith msg)
C:\LIBS\DCMTK\mingw32\include\dcmtk\oflog\logmacro.h:106: error: no matching function for call to 'dcmtk::log4cplus::Logger::getInstance(const tchar*&)'
return Logger::getInstance (logger);
^
I tried with
#pragma GCC diagnostic warning "-fpermissive"
but it don't patch the last error
maybe I have to set some gcc flag in the .pro file?
-
- OFFIS DICOM Team
- Posts: 318
- Joined: Mon, 2014-03-03, 09:51
- Location: Oldenburg, Germany
Re: mingw problems
It seems to me, that you define "UNICODE" in your project. This is currently not supported by DCMTK.
Who is online
Users browsing this forum: Google [Bot] and 1 guest