GCC compiler how-to instructions (Revision 3) =============================================================================== Odin libraries now use Gnu Compiler Suite to built some DLL's they require. You will need GNU C/C++ 3.2.1 or later version compilers to build it. For current open GCC Compiler Bugs please visit http://xtracker.netlabs.org To set up EMX for Odin build: First get EMX runtime http://hobbes.nmsu.edu/pub/os2/dev/emx/v0.9d/emxrt.zip Add EMX\DLL to your LIBPATH. Be sure to add to PATH emx\bin directory. To check that you have all you need type 'emxrev' at your command prompt. o GNU Make: Get it from hobbes and place somewhere in %PATH% http://hobbes.nmsu.edu/pub/os2/dev/util/make-3_79_2a1-bin.zip o EMX Development stuff: http://hobbes.nmsu.edu/pub/os2/dev/emx/v0.9d/bsddev.zip http://hobbes.nmsu.edu/pub/os2/dev/emx/v0.9d/emxdev1.zip http://hobbes.nmsu.edu/pub/os2/dev/emx/v0.9d/emxdev2.zip http://hobbes.nmsu.edu/pub/os2/dev/emx/v0.9d/gppdev1.zip http://hobbes.nmsu.edu/pub/os2/dev/emx/v0.9d/gppdev2.zip http://hobbes.nmsu.edu/pub/os2/dev/emx/v0.9d/gnudev1.zip http://hobbes.nmsu.edu/pub/os2/dev/emx/v0.9d/gnudev2.zip Unzip each of these packages in the directory above EMX. All the extracted files will go into the EMX directory after that unzip fix04 over them: http://hobbes.nmsu.edu/pub/os2/dev/emx/v0.9d/emxfix04.zip Once you have unzipped these packages go to X:\EMX\LIB\ and run OMFLIBS.CMD. Add three variables to config.sys and reboot: set EMX=x:\emx set C_INCLUDE_PATH=x:/emx/include; set CPLUS_INCLUDE_PATH=x:/emx/include; set LIBRARY_PATH=x:/emx/lib If you do not want to add them to config.sys add them to newgcc.cmd during GCC 3.2.1 installation phase like this: set EMX=x:\emx set C_INCLUDE_PATH=%EMX_PATH%include; set CPLUS_INCLUDE_PATH=%EMX_PATH%include; set LIBRARY_PATH=%EMX_PATH%lib after SET PATH line. Be warned however that all EMX will function correctly only in a window where you've launched newgcc.cmd. !! NEW !! Note that new Odin build system requires you to setup 'EMX' variable that points to EMX path. Note OS/2 slashes used there. o GNU Utils It is necessary to get and install (place in %PATH%) this two packages: http://hobbes.nmsu.edu/pub/os2/util/file/gnufutil.zip http://hobbes.nmsu.edu/pub/os2/util/file/gnututil.zip Make sure you placed *.exe files in your %PATH% and .dll files in %LIBPATH% so OS/2 can find and launch utils from anywhere. o GCC 3.2.1 Get: * binutils-os2-2.11.2-bin.zip * emx-strt-fix-0.0.2.zip * gcc-os2-3.2.1-beta-gcc.zip * gcc-os2-3.2.1-beta-gpp.zip * gettext-os2-0.10.40-bin.zip from ftp://ftp.netlabs.org/incoming/gcc-3.2.1-r2 or later from ftp://ftp.netlabs.org/pub/gcc. Unzip each of these packages in the directory above EMX. All the extracted files will go into the EMX directory. MAKE SURE YOU DO THIS AFTER YOU INSTALL THE EMX/GCC DEV PACKAGES. These zips overwrite many of the files from the previous group. Now go to x:\emx\include and rename 'cpp' directory to 'cpp-old'. Go to x:\emx\bin.new and correct newgcc.cmd: 1. Check EMX_PATH points to correct location of EMX files on your system 2. Set WORK_SHELL to suite your needs (File Commander, 4OS2, or simply leave as it is for CMD shell) 3. Add 'SET GCCLOAD=20' after SET PATH line. Launch it afterwards. Launch gcc -v and check it is 3.2.1 Do NOT leave window where you've launched newgcc.cmd 1. Go to X:\EMX\LIB\ and type 'make'. 2. Go to X:\EMX\LIB\GCC-LIB\I386-PC-OS2-EMX\3.2.1\and type 'make'. Go to Odin directory and start ConfigureGCC.cmd - this should produce no errors. Note that script assumes gcc.exe, g++.exe, as.exe to be in the PATH. o Updating from 3.0.3 Before using 3.2.1 please remove 3.0.3 compiler from your system. To do so follow this steps: * Delete x:\emx\lib\gcc-lib\i386-pc-os2_emx * Delete x:\emx\include\g++-v3 * Install 3.2.1 normally and run ConfigureGCC.cmd to check your installation