Using mysql Connector/C++ in a dll problem
Hello
I have successfully used Connector/C++ as a static library and dynamic library in a command line console.
I have a need to compile this as a dll. I can get it to compile but when the external program calls it the dll does not behave in the same manner. The program does run when I include all the libraries and with this code.
sql::Driver *driver;
sql::Connection *con;
sql::Statement *stmt;
// driver = get_driver_instance();
When I uncomment the driver code out it does not work. I have tried using Connector/C++ as a static and dynamic library. Also if I call an unrealted function it does not work if the driver code is uncommented.
Ie
char* test1(){
return “test1”;
}
void test2(){
sql::Driver *driver;
sql::Connection *con;
sql::Statement *stmt;
driver = get_driver_instance();
}
If I call test1 it will not work unless the driver code is commented out.
I am not sure how to debug this problem futher or what my nexts steps should be.
Please give me some suggests or if you need additional information I will be happy to provide it.
Cheers,
Maurice
Subject
Views
Written By
Posted
Using mysql Connector/C++ in a dll problem
4255
October 30, 2009 08:57PM
2520
November 02, 2009 04:10PM
2566
November 02, 2009 05:42PM
2907
November 04, 2009 06:37AM
3425
November 09, 2009 03:09PM
2451
November 12, 2009 09:20AM
2140
December 07, 2009 06:20AM
2879
December 07, 2009 05:49AM
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.