MySQL Forums
Forum List  »  Connector/C++

C++ Connector throws 'bad_alloc' when connect gets called
Posted by: Finn Ganser
Date: April 14, 2022 10:24AM

Hello guys!
I just started with MySQL and the C++ Connector. After an hour of trying to install it and include it into my project I finally figured it out. But now Ive got a new problem: When I call 'driver->connect(...)' it returns a 'bad_alloc' and the program crashes. I found two threas on stackoverflow but they have no solution. I really dont know what to do next and the doc isnt really helpfull.

Version: 8.0.28
I included the 'jdbc' folder and added the 'lib64' lib-folder. In the project settings I added "asmysqlcppconn.lib" as additional dependency (im on a german machine so idk if its called that way).

Thanks for your help guys!

Options: ReplyQuote


Subject
Views
Written By
Posted
C++ Connector throws 'bad_alloc' when connect gets called
1403
April 14, 2022 10:24AM


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.