title: Compiling C++ code with allegro 5 and g++
body: <p>What flags do I need to add to g++ in order to compile code using allegro 5? I tried</p>
  
  <pre><code>g++ allegro5test.cpp -o allegro5test `allegro-config --libs`
  </code></pre>
  
  <p>but that is not working. I'm using ubuntu 11.04. I installed allegro 5 using the instructions at <a href="http://wiki.allegro.cc/index.php?title=Install_Allegro5_From_SVN/Linux/Debian" rel="nofollow">http://wiki.allegro.cc/index.php?title=Install_Allegro5_From_SVN/Linux/Debian</a></p>
  
  <p>I tried:</p>
  
  <pre><code>g++ allegro5test.cpp -o allegro5test `allegro-config --cflags --libs`
  </code></pre>
  
  <p>And it also gives a bunch of undefined errors, like: undefined reference to `al_install_system'</p>
  
  <p><code>allegro-config --cflags --libs</code> outputs:</p>
  
  <pre><code>-I/usr/local/include
  -L/usr/local/lib -lalleg
  </code></pre>