Hello all, I was trying to build a simple application using Oracle OCCI. Unfortunately this application stops working during connection to Oracle database. I guess it was because of linking but not sure. Can you please help me out?
After showing 'Start, Create connection,Windows reports 'main.exe stopped working.'
Code is:
cout << "Start" << endl;
env = Environment::createEnvironment(Environment::DEFAULT);
try {
cout << "Create connection" << endl;
con = env->createConnection(user, password, db);
cout << "Done" << endl;
}
catch (SQLException& ex) {
cout << ex.getMessage();
exit(EXIT_FAILURE);
}
Platform: Windows 7 64bit
Oracle 11.2 64bit
OCCI 11.2 64bit
Visual Studio 2012 Express
Compiling and linking output:
cl -c -nologo -MT -W3 -WX -D_CRT_SECURE_NO_WARNINGS /EHsc -IC:\Users\hongliang.w
ang\Downloads\instantclient_11_2\sdk\include -Fomain.obj main.cpp
main.cpp
link -nologo -release Ws2_32.lib main.obj C:\Users\hongliang.wang\Downloads\inst
antclient_11_2\sdk\lib\msvc\oraocci11.lib C:\Users\hongliang.wang\Downloads\inst
antclient_11_2\sdk\lib\msvc\oci.lib C:\Users\hongliang.wang\Downloads\instantcli
ent_11_2\sdk\lib\msvc\ociw32.lib -out:main.exe
Following dlls are in the same directory as main.exe
2010-03-30 19:03 657,408 oci.dll
2010-03-13 21:39 1,564,672 orannzsbb11.dll
2010-03-30 18:22 1,314,304 oraocci11.dll
2010-03-30 19:05 135,725,056 oraociei11.dll
Any ideas? Thanks in advance!
Sysop: | Keyop |
---|---|
Location: | Huddersfield, West Yorkshire, UK |
Users: | 468 |
Nodes: | 16 (2 / 14) |
Uptime: | 34:34:10 |
Calls: | 9,444 |
Calls today: | 1 |
Files: | 13,594 |
Messages: | 6,111,248 |