Changes between Version 4 and Version 5 of Build_Cocotron
- Timestamp:
- 09/21/08 13:30:15 (2 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Build_Cocotron
v4 v5 10 10 }}} 11 11 12 Building cocotron's Foundation is not as simple as GCC, so I'll be commenting all the steps. 12 Building cocotron's Foundation is not as simple as GCC, so I'll be commenting all the steps. 13 13 14 14 {{{ 15 15 cd cocotron-trunk/Foundation # we're building only Foundation 16 wget http://fow.farcaller.net/trac/raw-attachment/wiki/Build_Cocotron/CMakeLists.txt # get the build rules 16 }}} 17 get the build script from this ticket: http://code.google.com/p/cocotron/issues/detail?id=168 and put it in current directory 18 {{{ 17 19 mkdir build 18 20 cd build … … 20 22 -DCMAKE_CXX_COMPILER=/opt/objc/bin/g++ \ 21 23 -DCMAKE_INSTALL_PREFIX=/opt/objc .. 22 # configure Foundation to build with our toolchain23 24 }}} 24 25 Now some dirty tricks :)26 {{{27 cd ../28 mkdir -p includes/Foundation29 cd includes/Foundation30 find ../.. -type f -name '*.h' -exec ln -s '{}' \;31 cd ../..32 }}}33 34 This gathers all Foundation headers in one place. XCode is clever about that, so in POSIX world we have to do that by hand35 25 36 26 If you have cocotron trunk r242 or below do and fix one nasty bug: … … 50 40 cd build 51 41 make 52 sudo cp libFoundation.so /opt/objc/lib/ 53 sudo cp -rL ../includes/Foundation /opt/objc/include/ 42 sudo make install 54 43 }}} 55 56 TODO: copy objc/* headers57 TODO: fix linking with Foundation/objc/platform_linux/objc_msg_sendv.s58 44 59 45 == Test code == … … 73 59 Build with: 74 60 {{{ 75 /opt/objc/bin/gcc test.m -o test -I../cocotron-trunk/ -lFoundation -lpthread -ldl \ 76 ../cocotron-trunk/Foundation/objc/platform_linux/objc_msg_sendv.s 61 /opt/objc/bin/gcc test.m -o test -I/opt/objc/include -L/opt/objc/lib -lFoundation -lpthread -ldl 77 62 }}} 63 64 You might also be interested in adding /opt/objc/lib into your /etc/ld.so.conf and running ldconfig
