Reputation: 643
I'm wondering if anyone can help me on getting my visual studio c++ project setup correctly to work with MySql?
I downloaded and installed MySql Server, and installed the developer content with the include files, but beyond that I'm a bit lost.
I tried adding the 'include' directory in my MySql install path to my additional includes directory, which allowed me to access the includes I needed, but left me with unresolved external symbol errors.
1>Main.obj : error LNK2019: unresolved external symbol _mysql_error@4 referenced in function _main
1>Main.obj : error LNK2019: unresolved external symbol _mysql_real_connect@32 referenced in function _main
Any help would be greatly appreciated.
Upvotes: 0
Views: 1328
Reputation: 3372
Sounds like the library isn't being included. The first thing I would look at is Additional Dependencies. You can either set it programatically or in Visual Studio (Solution->Properities->Configuration Properties-> Linker
You may need to include the library under "additional library directories" in that same area.
Upvotes: 1