Cross compile Go on OSX?

With Go 1.5 they seem to have improved the cross compilation process, meaning it is built in now. No ./make.bash-ing or brew-ing required. The process is described here but for the TLDR-ers (like me) out there: you just set the GOOS and the GOARCH environment variables and run the go build. For the even lazier … 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

Missing include “bits/c++config.h” when cross compiling 64 bit program on 32 bit in Ubuntu

Adding this answer partially because it fixed my problem of the same issue and so I can bookmark this question myself. I was able to fix it by doing the following: sudo apt-get install gcc-multilib g++-multilib If you’ve installed a version of gcc / g++ that doesn’t ship by default (such as g++-4.8 on lucid) … Read more

How to stop MinGW and MSYS from mangling path names given at the command line

There is a way to suppress the path translation by setting MSYS_NO_PATHCONV=1 in Windows Git MSys or MSYS2_ARG_CONV_EXCL=”*” in MSYS2. Alternatively, you can set the variable only temporarily just for that command by putting the assignment just before the command itself: MSYS_NO_PATHCONV=1 arm-none-linux-gnueabi-gcc.exe -Wall -g \ -Wl,–dynamic-linker=/usr/lib/myrpath/ld-linux.so.3 \ -Wl,-rpath=/usr/lib/myrpath \ -I../targetsysroot/usr/include \ myprogram.c -o myprogram