At first, small program:
#include
using namespace mysqlpp;
void mainuu ()
{ Connection conn(\"mysql\", \"localhost\", \"root\", \"pwd\");}
Those are linker errors.
When you create your final executable, you still must provide references to all library functions, just as you did when you compiled the single translation unit.
So, pass -lmysqlclient -lmysqlpp
to g++
this time, too.
If you are using an Integrated Development Environment, configure your project's build settings accordingly. In particular, I see that CodeLite has both "Compiler" and "Linker" build settings. It's "Linker" settings that you're after.
For more information on the build process (i.e. compiling, linking and the difference), read a good C++ book.
Looks like you need to edit CodeLite project settings and add these settings -lmysqlclient -lmysqlpp
that you pass in command line. Fill Library Path and Libraries fields on Linker tab.