#Using C++ Connector8 with a Dynamic Link Library (MSVS19)

3 messages · Page 1 of 1 (latest)

digital minnow
#

Hey, I am trying to create a Dynamic Link Library (DLL) File with MSVS19 in c++17 code. The API I am creating the dll for is written in stdc++17.

I did created a separate project that is a console project, setup connector++ like that: https://learn.microsoft.com/de-de/azure/mysql/single-server/connect-cpp and even change the language standard to /stdc++17 and the connector works perfectly with no issues. I can create database tables, pull information, update information. When I try to add the same connector in the same way to my or to a new dynamic link library project, I get the following errors.

1>C:\plugins\mysql8.0.29-64\include\jdbc\cppconn\driver.h(74,21): error C2059: syntax error: 'function-style cast'
1>C:\plugins\mysql8.0.29-64\include\jdbc\cppconn\driver.h(74,26): error C2143: syntax error: missing ';' before '{'
1>C:\plugins\mysql8.0.29-64\include\jdbc\cppconn\driver.h(74,26): error C2447: '{': missing function header (old-style formal list?)
1>C:\plugins\mysql8.0.29-64\include\jdbc\cppconn\driver.h(75,26): warning C4002: too many arguments for function-like macro invocation 'check'
1>C:\plugins\mysql8.0.29-64\include\jdbc\cppconn\driver.h(75,21): error C2059: syntax error: 'function-style cast'
1>C:\plugins\mysql8.0.29-64\include\jdbc\cppconn\driver.h(75,26): error C2143: syntax error: missing ';' before '{'
1>C:\plugins\mysql8.0.29-64\include\jdbc\cppconn\driver.h(75,26): error C2447: '{': missing function header (old-style formal list?)
1>C:\plugins\mysql8.0.29-64\include\jdbc\cppconn\driver.h(83,3): warning C4002: too many arguments for function-like macro invocation 'check'```

Any help would be appreciated.
winged glacierBOT
#

When your question is answered use !solved to mark the question as resolved.

Remember to ask specific questions, provide necessary details, and reduce your question to its simplest form. For more information use !howto ask.

winged glacierBOT
#

This question thread is being automatically closed. If your question is not answered feel free to bump the post or re-ask. Take a look at !howto ask for tips on improving your question.