Error on CodeBocks c++ to connect to MySQL using SQLAPI++

214 Views Asked by At

I am good at Code Blocks c++ 11, Python 3 and MySQL, recently I was trying to use SQLAPI++ to connect to MySQL. I copied the codes from the official website http://www.sqlapi.com/Examples/step1.cpp and changed the database name, user name and password as required. The code compiles successfully but run into the following error "Process returned -1-73741819(0xC0000005)".

I am running CodeBlocks 17.12 and MySQL 8.0 on Windows 10, I searched for answers to the problem, in the link Unable to connect to MYSQL using SQLAPI++, the author Siddhant said, he used CodeBlock 10.0.5 and MySQL 5.5 to have fixed the error.

Do I have to go back to CodeBlock 10.0.5 and MySQL 5.5? Currently the database is working well with Python 3.

Thank you in advance for your help.

1

There are 1 best solutions below

0
On

Solution: Re-compile CodeBlocks by 64-bits compiler, purchase the source code of SQLAPI++ and compile it by 64-bits compiler, then, Codeblocks c++ works well with SQLAPI++.