title: Why simple mysql++ code compiles standalone, but not in project?
body: <p>At first, small program:</p>
  
  <pre><code>#include &lt;mysql++.h&gt;
  using namespace mysqlpp;
  
  void mainuu ()
  { Connection conn("mysql", "localhost", "root", "pwd");}
  </code></pre>
  
  <p>If I compile it as one file in CodeLite or in such way:</p>
  
  <pre><code>g++ -I/usr/include/mysql -I/usr/include/mysql++ -lmysqlclient -lmysqlpp -o Test mysql_api.cpp
  </code></pre>
  
  <p>it's ok
  but, when I try to build whole project with this file I get this:</p>
  
  <pre><code>g++ -o ./Debug/server ./Debug/main.o ./Debug/log.o ./Debug/packet.o ./Debug/mysql_api.o  -L.   
  ./Debug/mysql_api.o: In function `mainuu()':
  /home/asyler/.codelite/workspace/test/server/mysql_api.cpp:10: undefined reference to `mysqlpp::Connection::Connection(char const*, char const*, char const*, char const*, unsigned int)'
  /home/asyler/.codelite/workspace/test/server/mysql_api.cpp:12: undefined reference to `mysqlpp::Connection::query(char const*)'
  /home/asyler/.codelite/workspace/test/server/mysql_api.cpp:13: undefined reference to `mysqlpp::SQLTypeAdapter::SQLTypeAdapter(char const*, bool)'
  /home/asyler/.codelite/workspace/test/server/mysql_api.cpp:13: undefined reference to `mysqlpp::operator&lt;&lt;(mysqlpp::quote_type1, mysqlpp::SQLTypeAdapter const&amp;)'
  /home/asyler/.codelite/workspace/test/server/mysql_api.cpp:19: undefined reference to `mysqlpp::operator&lt;&lt;(std::basic_ostream&lt;char, std::char_traits&lt;char&gt; &gt;&amp;, mysqlpp::String const&amp;)'
  /home/asyler/.codelite/workspace/test/server/mysql_api.cpp:10: undefined reference to `mysqlpp::Connection::~Connection()'
  /home/asyler/.codelite/workspace/test/server/mysql_api.cpp:10: undefined reference to `mysqlpp::Connection::~Connection()'
  ./Debug/mysql_api.o: In function `mysqlpp::Row::operator[](int) const':
  /usr/include/mysql++/row.h:328: undefined reference to `mysqlpp::Row::at(unsigned int) const'
  ./Debug/mysql_api.o: In function `mysqlpp::Query::store()':
  /usr/include/mysql++/query.h:467: undefined reference to `mysqlpp::Query::str(mysqlpp::SQLQueryParms&amp;)'
  /usr/include/mysql++/query.h:467: undefined reference to `mysqlpp::SQLTypeAdapter::SQLTypeAdapter(std::basic_string&lt;char, std::char_traits&lt;char&gt;, std::allocator&lt;char&gt; &gt; const&amp;, bool)'
  /usr/include/mysql++/query.h:467: undefined reference to `mysqlpp::Query::store(mysqlpp::SQLTypeAdapter const&amp;)'
  collect2: ld returned 1 exit status
  make[1]: *** [Debug/server] Error 1
  make[1]: Leaving directory `/home/asyler/.codelite/workspace/test/server'
  make: *** [All] Error 2
  </code></pre>
  
  <p>Here is CodeLite g++ compiler settings:</p>
  
  <pre><code>-g -I/usr/include/mysql -I/usr/include/mysql++ -lmysqlclient -lmysqlpp -L/usr/lib/mysql -L/usr/lib/mysql++ -lmysql++
  </code></pre>