Re: [Libjpeg-turbo-devel] problem when using jmorecfg.h and windows.h
SIMD-accelerated libjpeg-compatible JPEG codec library
Brought to you by:
dcommander
From: DRC <dco...@us...> - 2014-04-18 08:59:29
|
Oops. Sorry. I replied twice. Ignore the previous reply. I had not fully examined IJG's fix when I wrote that. On 4/18/14 3:57 AM, DRC wrote: > This was fixed a long time ago (in 1.2 beta.) How are you building > libjpeg-turbo, or where are you getting your build? > > I'm suspicious of the fact that your build of libjpeg-turbo resides in > c:/MinGW/msys/1.0/opt/libjpeg-turbo. /opt/libjpeg-turbo is generally > used for Unix builds, not Windows builds. Methinks someone may have > gotten too creative with distributing or building our code. > > The Windows versions of libjpeg-turbo (except for Cygwin, which is > treated as a Unix build) are built with CMake instead of autotools, and > the CMake build system generates a special version of jconfig.h just for > Windows. That special version of jconfig.h includes code to work around > the INT32 conflict. Note that IJG also has their own fix for this > issue, in jmorecfg.h. Their fix, however, does not work if jpeglib.h is > included before windows.h. Ours does. Also, it made more sense to me > to include our fix in a header that was only distributed on Windows, but > if a distributor included the wrong version of jconfig.h in the > distribution, then the problem you're observing could occur. I suspect > you might just be using an old version. Install our official package > (libjpeg-turbo-gcc64.exe), which puts libjpeg-turbo in > c:/libjpeg-turbo-gcc64/, and use that when building your code instead. > > > On 4/18/14 2:30 AM, Vincent Torri wrote: >> hello >> >> I'm compiling a library on Windows using libjpeg-turbo and mingw-w64 >> v3 (using 64 bits toolchain) and I get that error : >> >> CC eet_image.lo >> In file included from >> C:/MinGW/msys/1.0/opt/libjpeg-turbo/include/jpeglib.h:29:0, >> from eet_image.c:38: >> C:/MinGW/msys/1.0/opt/libjpeg-turbo/include/jmorecfg.h:163:14: error: >> conflicting types for 'INT32' >> typedef long INT32; >> ^ >> In file included from >> c:\mingw\msys\1.0\opt\windows_64\x86_64-w64-mingw32\include\winnt.h:134:0, >> >> from >> c:\mingw\msys\1.0\opt\windows_64\x86_64-w64-mingw32\include\minwindef.h:146, >> >> from >> c:\mingw\msys\1.0\opt\windows_64\x86_64-w64-mingw32\include\windef.h:8, >> from >> c:\mingw\msys\1.0\opt\windows_64\x86_64-w64-mingw32\include\windows.h:69, >> from >> c:\mingw\msys\1.0\opt\windows_64\x86_64-w64-mingw32\include\winsock2.h:23, >> >> from eet_image.c:30: >> c:\mingw\msys\1.0\opt\windows_64\x86_64-w64-mingw32\include\basetsd.h:31:22: >> >> note: previous declaration of 'INT32' was h >> ere >> typedef signed int INT32,*PINT32; >> ^ >> >> that library includes jpeglib.h after windows.h (if I include it >> before, i get other similar errors) >> >> in addition, INT32 and al types already exists on Windows : >> http://msdn.microsoft.com/en-us/library/windows/desktop/aa383751%28v=vs.85%29.aspx >> >> >> Is there a solution to that problem ? >> >> thank you >> >> Vincent Torri |