MySQL Forums
Forum List  »  Connector/C++

Re: Please help. cant get connector to work, unresolved external symbol error
Posted by: Bernie Sensation
Date: May 29, 2024 02:08PM

So after a good week or so of banging my head against a brick wall this is how it panned out...
I installed visual studio 2022 and c++ connector on my Windows 10 laptop. Btw, I was previously trying to get it working on my win10 desktop. On the lappy I did everything as above, and bam!, exact same error. Strange, how come it's doing the same on 2 diff machines, yet it appears that lots of people in the YouTube comments had no issues... Hmmmmmm!

Further investgation led me onto a comment by some dude called William

Basically - drop mysqlcppconn-9-vs14.dll into the main.cpp folder
And change the lib to mysqlcppconn.lib

That's the difference... And it worked.

I can't pretend to understand what exactly has happened here, I need to go away and do some reading. Here are the full settings just in case anyone runs into a similar issue

Put in .exe directory
\mysql-connector-c++-8.0.29-winx64\lib64\mysqlcppconn-9-vs14.dll

Project Properties
C/C++
General
Additional Include Directories
\mysql-connector-c++-8.0.29-winx64\include\jdbc
Preprocessor
Preprocessor Definitions
STATIC_CONCPP;
Code Generation
Runtime Library
Multi-threaded DLL (/MD)
Linker
General
Additional Library Directories
\mysql-connector-c++-8.0.29-winx64\lib64\vs14
Input
Additional Dependencies
mysqlcppconn.lib

Options: ReplyQuote


Subject
Views
Written By
Posted
Re: Please help. cant get connector to work, unresolved external symbol error
95
May 29, 2024 02:08PM


Sorry, only registered users may post in this forum.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.