1

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!

John
  • 989
  • 1
  • 7
  • 11
  • "Are there other libs or includes that are required from the server?" Probably. Undefined reference is a linker error. – holgac Oct 18 '11 at 12:45
  • Yes, I am aware it is a linker error. I tried installing the server and using those libs instead. I still am getting the same error. Is there anything else that I have done / should have done that could be causing this? – John Oct 23 '11 at 15:54

0 Answers0