• Cross compiling using mingw32-gcc
    2 replies, posted
I'm looking to see how I can do some cross compiling so that the opengl programs I make can be run on windows, but the documentation I'm reading isn't making a whole lot of sense to me. I've installed mingw32-gcc and all the dependencies, however I'm not entirely sure where to go from there.
First thing is to code a new main() and message pump for the Windows version. Most of the OpenGL code will compile without changes. mingw is used the same way as gcc. If you haven't already, take a look at CMake, it will simplify the makefile and build process on Windows and Linux.
I don't know what distro you're using, but I do my cross compiles on CentOS. If you just write a simple "Hello World", you compile it with the command [code] i686-mingw32-gcc hello.c [/code] (I hope that's right) If you write a Makefile, you just set CC to i686-mingw32-gcc.
Sorry, you need to Log In to post a reply to this thread.