Menu

Problem linking mysql client library

Help
airmax-b3
2012-01-08
2012-12-14
  • airmax-b3

    airmax-b3 - 2012-01-08

    I try to build linknx - somehow "make" has problems linking to the mysql client library.
    I get errors like

    persistentstorage.o: In function `~MysqlPersistentStorage':
    /home/airmax/linknx-0.0.1.29/linknx/src/persistentstorage.cpp:156: undefined reference to `mysql_close'
    persistentstorage.o: In function `MysqlPersistentStorage':
    /home/airmax/linknx-0.0.1.29/linknx/src/persistentstorage.cpp:140: undefined reference to `mysql_init'
    /home/airmax/linknx-0.0.1.29/linknx/src/persistentstorage.cpp:144: undefined reference to `mysql_options'
    /home/airmax/linknx-0.0.1.29/linknx/src/persistentstorage.cpp:146: undefined reference to `mysql_real_connect'
    

    There is help on the mysql page, yet I my Linux knowledge isn't good enough to know how to apply this for building linknx.
    http://dev.mysql.com/doc/refman/5.0/en/c-api-linking-problems.html

    Any help greatly appreciated.

     
  • Othmar

    Othmar - 2012-01-22

    Hi,

    I need to add

    export LIBS="-lmysqlclient_r"
    

    to compile with mysql successfully

    Regards, Othmar

     
  • airmax-b3

    airmax-b3 - 2012-02-04

    Thanks - that did help!

     
  • Scott White

    Scott White - 2012-09-22

    Sorry guys, being thick here.

    Where do I add this as I am having the some problem?

     
  • Scott White

    Scott White - 2012-09-22

    1,$s/some/same/g

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.