Linking failures with MySQL++ 3.0.1

View: New views
3 Messages — Rating Filter:   Alert me  

Linking failures with MySQL++ 3.0.1

by Steven Van Ingelgem-4 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

System: Debian


Hi,


I have "some" linking failures with my program linking to libmysql++ 3.0.1
(freshly compiled).
Some of them are:
undefined reference to `mysqlpp::Connection::query()'
undefined reference to `mysqlpp::Row::at(unsigned int) const'
undefined reference to `mysqlpp::Connection::query()'
 etc ...

The weird thing is, is that it doesn't complain at compile time (and
checking the headers that's normal because those functions are defined).

But why would it complain at linking time only? What am I doing wrong?

My build line is:
/usr/bin/c++      -fPIC "CMakeFiles/dataparser.dir/HelpFunctions.o"
"CMakeFiles/dataparser.dir/InterpretRecord.o"
"CMakeFiles/dataparser.dir/LifeCycle.o"
"CMakeFiles/dataparser.dir/LoadAbgleichTab.o"
"CMakeFiles/dataparser.dir/main.o" "CMakeFiles/dataparser.dir/stlini.o"   -o
bin/dataparser -rdynamic -lmysqlpp


Compilation against 2.x went fine.


Greetings,
Steven

Re: Linking failures with MySQL++ 3.0.1

by Warren Young-3 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Steven Van Ingelgem wrote:
> Compilation against 2.x went fine.

You're mixing v2.x and v3.x headers and libraries.  Do a "make clean" on
your project, clear off all the MySQL++ 2.x stuff from your system (or
segregate it) and start a clean build with v3.x.  Also, you've read
through the breakages chapter, yes?

--
MySQL++ Mailing List
For list archives: http://lists.mysql.com/plusplus
To unsubscribe:    http://lists.mysql.com/plusplus?unsub=lists@...


Re: Linking failures with MySQL++ 3.0.1

by Steven Van Ingelgem-4 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Somehow I was taking a wrong library indeed :). Thanks for pointing out the
obvious to me.


Greetings


On 11/04/2008, Warren Young <mysqlpp@...> wrote:

>
> Steven Van Ingelgem wrote:
>
> > Compilation against 2.x went fine.
> >
>
> You're mixing v2.x and v3.x headers and libraries.  Do a "make clean" on
> your project, clear off all the MySQL++ 2.x stuff from your system (or
> segregate it) and start a clean build with v3.x.  Also, you've read through
> the breakages chapter, yes?
>
> --
> MySQL++ Mailing List
> For list archives: http://lists.mysql.com/plusplus
> To unsubscribe:
> http://lists.mysql.com/plusplus?unsub=steven@...
>
>
LightInTheBox - Buy quality products at wholesale price!