MySql Connector/C++ Undefined Reference Errors

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-11 10:43:26

问题


I need to write a c/c++ application that connects to a mysql database. I have been trying to install the c & c++ connectors to be able to do this, however I keep getting undefined reference errors. Below is how I set it up, can anyone tell me what I've done wrong?

I'm using WINDOWS 7 64 bit with Netbeans IDE and cygwin compiler.

What I've done:

  1. I downloaded and installed win x64 version of c & c++ connectors from mysql.com

  2. I followed the tutorial Here. From the "Hello World" heading on (Just the netbeans setup stuff). I know the tutorial is for linux. I used it because the netbeans instructions looked the same as windows (the lib extensions are just different)

I've tried linking mysql dynamically and statically, but I get the same error.

note: I didn't install the mysql server. I found the required libs in the c connector. Is there a large difference between that one and the one in the server? Are there other libs or includes that are required from the server?

Using the example "Hello World" program in that tutorial I get the error:

NetBeansProjects/CppApplication_11/main.cpp:41: undefined reference to '_get_driver_instance'

Can anyone see what I've done wrong? thanks!

来源:https://stackoverflow.com/questions/7806773/mysql-connector-c-undefined-reference-errors

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!