MySQL Forums
Forum List  »  Connector/C++

Using C++ Connector8 with a Dynamic Link Library (msvs19)
Posted by: David Bontempo
Date: May 06, 2022 11:57AM

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 can created a separate project that is a console project, setup connector++ 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.

Options: ReplyQuote


Subject
Views
Written By
Posted
Using C++ Connector8 with a Dynamic Link Library (msvs19)
507
May 06, 2022 11:57AM


Sorry, you can't reply to this topic. It has been closed.

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.