[Gimp-developer] Compiling LibOpenJPEG using MINGW/MSYS
Tor Lillqvist
tml at iki.fi
Mon Oct 27 14:53:04 PDT 2008
> Ok. I choose Cygwin, as it contains these files. Is this OK ?
Sure, if you want to build code for Cygwin, but that has then nothing
to do with the "native" Win32.
My reply was perhaps a bit too terse, a failed attempt to be ironic.
> I've copied the files from this crappy system into my MSYS/MINGW tree.
That is totally wrong and won't work at all. You wouldn't copy header
files like <windows.h> from Windows to Linux and think "hey, now I can
build Windows software to run on Linux", would you? No more can you
copy header files from Cygwin to a Win32 compiler and expect to be
able to build Win32 software using those header files.
What you need to do is to *port* the code to use what's available on
Windows instead of the functionality declared in the "missing" header
files.
#ifndef _WIN32
#include <sys/resource.h>
#else
#include <windows.h>
#endif
...
#ifndef _WIN32
... whatever code that uses functionality declared in <sys/resource.h>
#else
... either just dummy replacement, or use corresponding Win32 APIs
#endif
> This is the same tree I'm using for my mozilla build environment. (I don't
> want two msys systems on the same PC, unless there is no choice).
No need for two MSYS systems.
--tml
More information about the Gimp-developer
mailing list