Ubuntu Linux cross-compiling 32bit binaries on a on 64bit systemFirst you need to to install the 32bit development environment sudo apt-get install libc6-dev-i386
for g++ you will need the multi version of the library package sudo apt-get install g++-multilib Second. when you compile you application specify the -m32 flag, either via the command line, or with the CFLAGS environment variable CFLAGS=-m32
or gcc -m32 -o program program.c
Cross compiling with mingw32msvcwhen using "autoconfig" configure set the following flags ./configure \ --prefix=/usr/i586-mingw32msvc \
--exec-prefix= /usr/bin/i586-mingw32msvc
Useful C Compiler directives__LINE__ The current line number __FILE__ The current file name
printf("I am over here: line %d, in file %s\n", __LINE__, __FILE__);
Patchingto create a patch use diff -rupN <path.org> <path.new>
to apply a patch use patch -p1 < patch file
|