Manual for cross-compiling a C++ application from Linux to Windows?

The basics are not too difficult: sudo apt-get install mingw32 cat > main.c <<EOF int main() { printf(“Hello, World!”); } EOF i586-mingw32msvc-cc main.c -o hello.exe Replace apt-get with yum, or whatever your Linux distro uses. That will generate a hello.exe for Windows. Once you get your head around that, you could use autotools, and set … Read more

Embed resources (eg, shader code; images) into executable/library with CMake

As an alternative to the answer of sfstewman, here’s a small cmake (2.8) function to convert all files in a specific folder to C data and write them in wished output file: # Creates C resources file from files in given directory function(create_resources dir output) # Create empty output file file(WRITE ${output} “”) # Collect … Read more