Samstag, 29. August 2009

C/C++ unter Ubuntu

Installation in der HTL St.Pölten:
IDE, Doku und Debugger:
sudo apt-get install gcc-doc glibc-doc kdbg ddd geany*

Libraries:
sudo apt-get install libfreetype6 libfreetype6-dev libgtk2.0-dev libmcrypt-dev libparagui1.1 libpng3 libsage2 libsage-dev libsdl1.2debian libsdl1.2-dev libsdl-console libsdl-gfx1.2-4 libsdl-gfx1.2-dev libsdl-image* libsdl-net1.2 libsdl-net1.2-dev libsdl-ttf2.0-0 libsdl-ttf2.0-dev libtool

eclipse installieren

Dokumentation:
sudo apt-get install glibc-doc gcc-doc devhelp
gcc systemdoku : /usr/share/doc/gcc-doc/gcc.html
glibc systemdoku : /usr/share/doc/glibc-doc/html/index.html

proggen.org
gcc
stdio: Referenz Übersicht proggen.org
Bibiliotheken: GLibc Galileo Proggen

Skriptum
Beispiele
Templates

Graphikprogrammierung mit SDL:

SDL-Doku
API-Doku: nach Kategorie, nach Name
SDL-gfx
gfx-API-Doku: gfxPrimitves rotoZoom Framerate
Tutorials
Wiki-Book deutsch
Tutorial
Tastatur-Maus
SDL-TTF-Fonts Referenz-Artikel PrintStrings
Ubuntu-Gamedev Wikispaces
Freegamedev wiki

Header Dateien -> /usr/include/SDL

gcc:
gcc -Wall -g -lm -o ausgabedate sourcedatei
Optionen
-g -> Debugging Information
-lm -> Bibliotheken dazulinken
-Wall -> alle Warnings anzeigen

Debugger:
sudo apt-get install insight ddd kdbg
gcc hallo.c -g -o hallo
insight hallo
kdbg hallo

IDE's:
linuxmafia - IDE-Übersicht
eclipse - sehr mächtig aber etwas Einarbeitungszeit notwendig
anjuta
codelite
geany -> sehr einfacher Editor , kein Debugger
codeblocks
gnome-devel
kdevelop
monodevelop
Netbeans

kdevelop:
sudo apt-get install kdevelop
sudo apt-get install c-cpp-reference kde-i18n-de glibc-doc libglib2.0-doc
Meldung X--tag=CC: command not found
sudo apt-get remove libtool
wget http://ftp.sjtu.edu.cn/ubuntu/pool/main/libt/libtool/libtool_1.5.26-1ubuntu1_i386.deb
sudo dpkg -i libtool_1.5.26-1ubuntu1_i386.deb

Geany-Erstellen-Includeparameter und Argumente:
  • Kompilieren:
    gcc -Wall -g -c `sdl-config --cflags` "%f"
  • Erstellen:
    gcc -Wall -g -lm  `sdl-config --cflags` `sdl-config --libs` -lSDL_gfx -lSDL_ttf -lSDL_image -o "%e" "%f"
  • Ausführen:
    "./%e"
  • Debugger:
    kdbg "./%e"

Graphische Oberflächen mit GTK unter Gnome:
Gnome Dokuübersicht
GTK+ Tutorial Erste Schritte
GTK+ Tutorial

sudo apt-get install libgtk2.0-dev
compile:
gcc `pkg-config --cflags gtk+-2.0` `pkg-config --libs gtk+-2.0`

1 Kommentar:

  1. SDL mit CodeBlocks unter Windows:
    http://c-pegrisch.blogspot.com/p/sdl-codeblocks.html

    AntwortenLöschen