Undefined reference to `mysql_init'

前端 未结 1 1013
Happy的楠姐
Happy的楠姐 2020-12-09 19:30

I am trying to compile my program on my new server, but it\'s not working for me at the moment.

Error log is:

rasmus@web01:~/c++$ make test
g++ `mysq         


        
相关标签:
1条回答
  • 2020-12-09 20:11

    The order of arguments to the linker is significant. Use mysql-config after listing the files that need it. The linker will see that cpulogger.o needs mysql_init and look in libraries listed after it for the symbol. If the libraries were listed earlier in the arguments they won't be searched again.

    0 讨论(0)
提交回复
热议问题