Create External Libs

This page will explain, step by step, how the external libraries are compiled.

You should always use the external package that is located in the File tab so you can ignore the following text.

If you want to create an new external package or compile an external library manually, read the following text.

Windows

libvorbis & libogg

openal

s3

  • Extracted from nevrax.org download because this lib doesn't exist anymore

curl

  • Download sources http://curl.haxx.se/download.html
  • Unzip
  • rename to curl
  • Comment or remove HAVE_GMTIME_R and add #define HTTP_ONLY 1 in lib/config-win32.h
  • For win2000 compatibility, add #include <wspiapi.h> after #include <ws2tcpip.h> in lib/setup.h
  • Open a dos command (visual studio cmd)
  • C:\code\external9_raw\curl
  • nmake vc-ssl-zlib RTLIBCFG=dynamic

mysql & zlib

  • Download Windows Source (zip) http://dev.mysql.com/downloads
  • Unzip
  • rename root directory to mysql
  • comment or remove the define in include\config-win.h #define HAVE_OPENSSL 1
    and #define HAVE_YASSL 1
  • Open mysql.sln in root directory
  • Select mysqlclient
  • Select Release mode
  • Compile

lua

luabind

FreeType2

ODE

It uses the SVN tag https://opende.svn.sourceforge.net/svnroot/opende/tags/0.8
(now we use dSingle, let's try to see if it works)

  • Copy config-default.h from ode\build to ode\include\ode
  • Verify that trimesh enabled and opcode defined are set to 1
  • Open ode\build\vs2005\ode.sln
  • Select ReleaseLib
  • Change the runtime library from Multithread DLL to Multithread
  • Compile
  • Select DebugLib
  • Change the runtime library from Multithread Debug DLL to Multithread Debug
  • Compile

STLport

libjpeg

  • Download: http://www.ijg.org/files/jpegsrc.v6b.tar.gz
  • Rename jconfig.vc into jconfig.h
  • Edit makefile.vc and add a '-' before the $(RM) to avoid the makefile error during deleting non existing file
  • Open a dos command (visual studio cmd)
  • cd C:\code\external9_raw\jpeg-6b
  • Execute "nmake /f makefile.vc"

libxml2

It uses the SVN tag http://svn.gnome.org/svn/libxml2/tags/LIBXML2_2_6_27
http://svn.gnome.org/viewcvs/libxml2/tags/LIBXML2_2_6_27

  • Open a dos command (visual studio cmd)
  • cd C:\code\external9_raw\libxml2\win32
  • @cscript configure.js compiler=msvc debug=no iconv=no zlib=no static=no dynruntime=yes http=no ftp=no
  • nmake /f Makefile.msvc libxmla

eax

download: http://developer.creative.com/articles/article.asp?at=1&sbcat=31&top=8&aid=138&file=EAX20SDK.exe

  • Installed
  • Copied manually files to C:\code\external9_raw*

fmod

  • install the latest version fmod ex
  • manually copy file from programfile/fmod/api to fmodapiex
  • unzip fmod3 into fmodapi3

GL

Linux

  1. CURL
    wget http://curl.haxx.se/download/curl-7.17.1.tar.gz
    tar zxvf curl-7.17.1.tar.gz
    mv curl-7.17.1 curl
    cd curl
    CC="gcc -fno-stack-protector" ./configure --prefix=$HOME/cvs/external/inst --enable-shared=no --enable-static --without-ssl --without-zlib --disable-ipv6 --without-libidn
    make clean
    make
    make install
    cd ..
  1. ZLIB
    wget http://www.gzip.org/zlib/zlib-1.2.3.tar.gz
    tar zxvf zlib-1.2.3.tar.gz
    mv zlib-1.2.3 zlib
    cd zlib
    #MAC CFLAGS="-mmacosx-version-min=10.4 -isysroot /Developer/SDKs/MacOSX10.4u.sdk/ -arch i386 -arch ppc -fno-stack-protector" LDFLAGS="-mmacosx-version-min=10.4 -isysroot /Developer/SDKs/MacOSX10.4u.sdk/ -Wl,-syslibroot,/Developer/SDKs/MacOSX10.4u.sdk/ -arch i386 -arch ppc" ./configure --prefix=$HOME/cvs/external/inst
    CC="gcc -fno-stack-protector" ./configure --prefix=$HOME/cvs/external/inst
    make clean
    make
    make install
    cd ..
  1. LUA
    wget http://www.lua.org/ftp/lua-5.1.2.tar.gz
    tar zxvf lua-5.1.2.tar.gz
    mv lua-5.1.2 lua
    cd lua
    #MAC emacs src/Makefile -> add -mmacosx-version-min=10.4 -isysroot /Developer/SDKs/MacOSX10.4u.sdk/ -arch i386 -arch ppc -fno-stack-protector à CFLAGS
    #MAC emacs src/Makefile -> add -mmacosx-version-min=10.4 -isysroot /Developer/SDKs/MacOSX10.4u.sdk/ -Wl,-syslibroot,/Developer/SDKs/MacOSX10.4u.sdk/ -arch i386 -arch ppc to LIB
    #MAC make macosx
    #emacs src/Makefile -> add -fno-stack-protector à CFLAGS
    make clean
    make linux
    make install INSTALL_TOP=$HOME/cvs/external/inst
    cd ..
  1. FREETYPE
    wget http://download.savannah.gnu.org/releases/freetype/freetype-2.3.5.tar.gz
    tar zxvf freetype-2.3.5.tar.gz
    mv freetype-2.3.5 freetype2
    cd freetype2
    #MAC CFLAGS="-mmacosx-version-min=10.4 -isysroot /Developer/SDKs/MacOSX10.4u.sdk/ -arch i386 -arch ppc -fno-stack-protector" LDFLAGS="-mmacosx-version-min=10.4 -isysroot /Developer/SDKs/MacOSX10.4u.sdk/ -Wl,-syslibroot,/Developer/SDKs/MacOSX10.4u.sdk/ -arch i386 -arch ppc" ./configure --prefix=$HOME/cvs/external/inst --enable-shared=no --enable-static
    CC="gcc -fno-stack-protector" ./configure --prefix=$HOME/cvs/external/inst --enable-static --enable-shared=no
    make clean
    make all install
    cp $HOME/cvs/external/inst/include/ft2build.h $HOME/cvs/external/inst/include/freetype2/
    cd ..
  1. LIBXML2
    wget ftp://xmlsoft.org/libxml2/libxml2-sources-2.6.31.tar.gz
    tar zxvf libxml2-sources-2.6.31.tar.gz
    mv libxml2-2.6.31 libxml2
    cd libxml2
    #MAC CFLAGS="-mmacosx-version-min=10.4 -isysroot /Developer/SDKs/MacOSX10.4u.sdk/ -arch i386 -arch ppc -fno-stack-protector" LDFLAGS="-mmacosx-version-min=10.4 -isysroot /Developer/SDKs/MacOSX10.4u.sdk/ -Wl,-syslibroot,/Developer/SDKs/MacOSX10.4u.sdk/ -arch i386 -arch ppc" ./configure --prefix=$HOME/cvs/external/inst --enable-shared=no --disable-dependency-tracking
    CC="gcc -fno-stack-protector" ./configure --prefix=$HOME/cvs/external/inst --enable-shared=no
    make clean
    make
    make install
    cd ..
  1. FMOD
    wget http://www.fmod.org/index.php/release/version/fmodapi41004linux.tar.gz
    tar zxvf fmodapi41004linux.tar.gz
    mv fmodapi41004linux fmodex
    cd fmodex
    cp -f api/inc/* $HOME/cvs/external/inst/include/
    cp -f api/lib/* $HOME/cvs/external/inst/lib/
    cd ..
  1. JPEG
    wget http://www.ijg.org/files/jpegsrc.v6b.tar.gz
    tar zxvf jpegsrc.v6b.tar.gz
    mv jpeg-6b/ jpeg
    cd jpeg/
    1. if make install crash, apply this patch http://www.kyngchaos.com/wiki/macosx:build:libjpeg
      #MAC cp /usr/share/libtool/config.sub .
      #MAC cp /usr/share/libtool/config.guess .
      #MAC CFLAGS="-mmacosx-version-min=10.4 -isysroot /Developer/SDKs/MacOSX10.4u.sdk/ -fno-stack-protector" LDFLAGS="-mmacosx-version-min=10.4 -isysroot /Developer/SDKs/MacOSX10.4u.sdk/ -Wl,-syslibroot,/Developer/SDKs/MacOSX10.4u.sdk/" ./configure --prefix=$HOME/cvs/external/inst --enable-shared=no --enable-static
      CC="gcc -fno-stack-protector" ./configure --prefix=$HOME/cvs/external/inst --enable-shared=no --enable-static
      make clean
      make
      make install-lib
      make install-headers
      cd ..
  1. ODE
    wget http://kent.dl.sourceforge.net/sourceforge/opende/ode-src-0.9.zip
    unzip ode-src-0.9.zip
    mv ode-0.9 ode
    cd ode/
    CXX="g++ -fno-stack-protector" ./configure --prefix=$HOME/cvs/external/inst --enable-release --disable-double-precision --with-trimesh=opcode --disable-shared --disable-soname --disable-debug --disable-demos
    make clean
    make
    make install
    cd ..
    rm inst/lib/libode.so