http://wiki.codeblocks.org/index.php?title=Installing_Code::Blocks_from_source_on_Linux
./bootstrap
This sets up the configure script and its dependencies. It only needs to be run once (after downloading the source from svn).
If you get errors like:
aclocal:configure.in:61: warning: macro `AM_OPTIONS_WXCONFIG' not found in library
Then aclocal is having trouble finding the wxWidgets .m4 files. You can do one of two things:To just get bootstrap to find the path this time do:
export ACLOCAL_FLAGS="-I `wx-config --prefix`/share/aclocal"
./configure make make install
To uninstall you can later run:
make uninstall
If you want to recompile everything, first run:
make clean make distclean make clean-bin make clean-zipfiles
By default, CodeBlocks will install to /usr/local. If you want it in its own tree (so you can have multiple versions of CodeBlocks, each in its own subdirectory of /opt) replace the above ./configure command with:
./configure --prefix=/opt/codeblocks-svn
By default, CodeBlocks will not compile the contributed plugins from SVN. If you want to compile / install them too, replace the above ./configure command with:
./configure --with-contrib-plugins=all
Resolving issues
When running Code::Blocks after the installation it might happen, that the system complains:
codeblocks: error while loading shared libraries: libcodeblocks.so.0: cannot open shared object file: No such file or directory
In that case make sure the library path where the Code::Blocks libraries where installed into is "known" to the system. For example: On Ubuntu using a default build process on a clean system will install the Code::Blocks executables to /use/local/bin and the libraries to /usr/local/lib. The latter is usually not known to a "clean" Ubuntu system. To add it to the search path for libraries do the following (as root / using sudo respectively):Add the following line to the file /etc/ld.so.conf:
/usr/local/lib
...and run:
ldconfig
tar tf wxGTK-2.8.12.tar.gz
324 ls
325 cp wxGTK-2.8.12.tar.gz /mnt/tools/
326 cd /mnt/tools/
327 ls
328 tar zxf wxGTK-2.8.12.tar.gz
329 ls
330 cd wxGTK-2.8.12/
331 ls
332 mkdir build_gtk2_shared_monolithic_unicode
333 ls
334 cd build_gtk2_shared_monolithic_unicode/
335 ls
336 ../configure --prefix=/opt/wx/2.8 --enable-xrc --enable-monolithic --enable-unicode
337 ls /usr/lib/libwx_gtk*
338 update-alternatives --config wx-config
339 make
340 ls
341 ../configure --prefix=/opt/wx/2.8 --enable-xrc --enable-monolithic --enable-unicode
342 pkg-config
343 pkg-config gtk+-2.0 --libs
344 curl http://apt.wxwidgets.org/key.asc | sudo apt-key add
345 sudo apt-get install curl
346 cd ..
347 sudo vi /etc/apt/sources.list
348 source /etc/apt/sources.list
349 sudo apt-get update
350 sudo apt-get install python-wxgtk2.8 python-wxtools wx2.8-i18n
351 sudo apt-get install python-wxgtk2.8 python-wxtools wx2.8-i18n libwxgtk2.8-dev libgtk2.0-dev
352 ls /usr/lib/libwx_gtk*
353 update-alternatives --config wx-config
354 cd build_gtk2_shared_monolithic_unicode/
355 ../configure --prefix=/opt/wx/2.8 --enable-xrc --enable-monolithic --enable-unicode
356 make
357 sudo make install
358 cd /etc/
359 ls
360 cat profile
361 echo $PATH
362 vi /etc/profile
363 sudo vi /etc/profile
364 source /etc/profile
365 echo $PATH
366 ls
367 vi ld.so.conf
368 sudo vi ld.so.conf
369 ldconfig
370 sudo ldconfig
371 wx-config --prefix
372 wx-config --libs
373 which wx-config
374 cd /mnt/tools/
375 cd codeblocks/
376 cd trunk/
377 ls
378 ./bootstrap
379 sudo apt-get install autoconf
380 ./bootstrap
381 export ACLOCAL_FLAGS="-I `wx-config --prefix`/share/aclocal"
382 ./bootstrap
383 ./configure
384 make
385 sudo make install
386 codeblocks
387 cd /etc/
388 cat profile
389 history
390 vi /etc/ld.so.conf
391 sudo vi /etc/ld.so.conf
392 sudo ldconfig
393 codeblocks