Skip to main content

Compiling libjpeg under MinGW (Win32)

2 replies [Last post]
greg80303
Offline
Joined: 2008-07-03
Points: 0

I have a Win32-based build under MinGW and I am running into a pretty well documented problem compiling the JPEG lib included in the VM.

The problem stems from 'cdc/src/share/basis/native/image/jpeg/lib/jmorecfg.h' typedef-ing INT32, which turns out to be a redeclaration that conflicts with the standard Windows header definitions. I can obviously fix the problem by modifying jmorecfg.h, but its not the correct solution. I'm guessing that some of the currently existing Win32 ports have already solved this problem, but I can't seem to find it. Can someone point me to how other Win32 points have dealt with this issue?

Greg

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
Davy Preuveneers

On Friday 19 September 2008, phonemeadvanced@mobileandembedded.org wrote:
> I have a Win32-based build under MinGW and I am running into a pretty well
> documented problem compiling the JPEG lib included in the VM.
>
> The problem stems from
> 'cdc/src/share/basis/native/image/jpeg/lib/jmorecfg.h' typedef-ing INT32,
> which turns out to be a redeclaration that conflicts with the standard
> Windows header definitions. I can obviously fix the problem by modifying
> jmorecfg.h, but its not the correct solution. I'm guessing that some of
> the currently existing Win32 ports have already solved this problem, but I
> can't seem to find it. Can someone point me to how other Win32 points have
> dealt with this issue?

I have head a similar problem with the same file typedef-ing 'boolean'
differently. I solved the problem by defining my own jmorecfg.h (stored in a
platform specific folder), and use a #pragma include_alias() to make sure
that the jpeg sources include my version of the file instead of the original
jmorecfg.h file.

Davy

---------------------------------------------------------------------
To unsubscribe, e-mail: advanced-unsubscribe@phoneme.dev.java.net
For additional commands, e-mail: advanced-help@phoneme.dev.java.net

xyzzy
Offline
Joined: 2006-08-30
Points: 0

cdc/src/win32/javavm/include/win32/windows.h tries to work around this issue, but I think it only helps if is included first.