User forums > Help
Code::blocks Oracle OCI/OCCI?
GalaG:
yes, her it is:
--- Code: ---------------- Build: Debug in OCCITest ---------------
mingw32-g++.exe -Wall -fexceptions -g -I..\..\XEClient\oci\include -c C:\codeblocksWS\OCCITest\main.cpp -o obj\Debug\main.o
mingw32-g++.exe -L..\..\XEClient\oci\lib\gcc -o bin\Debug\OCCITest.exe obj\Debug\main.o ..\..\XEClient\oci\lib\gcc\liboraocci10.a
obj\Debug\main.o: In function `main':
C:/codeblocksWS/OCCITest/main.cpp:43: undefined reference to `oracle::occi::SQLException::SQLException(oracle::occi::SQLException const&)'
C:/codeblocksWS/OCCITest/main.cpp:45: undefined reference to `oracle::occi::SQLException::getMessage() const'
C:/codeblocksWS/OCCITest/main.cpp:45: undefined reference to `oracle::occi::SQLException::~SQLException()'
C:/codeblocksWS/OCCITest/main.cpp:45: undefined reference to `oracle::occi::SQLException::~SQLException()'
obj\Debug\main.o: In function `ZN7occidmlC1ESsSsSs':
C:/codeblocksWS/OCCITest/main.cpp:(.text$_ZN7occidmlD1Ev[occidml::~occidml()]+0x2f): undefined reference to `oracle::occi::Environment::terminateEnvironment(oracle::occi::Environment*)'
C:/codeblocksWS/OCCITest/main.cpp:(.text$_ZN7occidmlC1ESsSsSs[occidml::occidml(std::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::basic_string<char, std::char_traits<char>, std::allocator<char> >)]+0x3a): undefined reference to `oracle::occi::Environment::createEnvironment(oracle::occi::Environment::Mode, void*, void* (*)(void*, unsigned int), void* (*)(void*, void*, unsigned int), void (*)(void*, void*))'
collect2: ld returned 1 exit status
Process terminated with status 1 (0 minutes, 1 seconds)
6 errors, 0 warnings
--- End code ---
MortenMacFly:
--- Quote from: GalaG on May 19, 2009, 04:05:19 pm ---yes, her it is:
--- End quote ---
OK - nothing wrong with that.
Please check the symbols as said in the previous post and also try to link against the MS libs directly. This should work just fine with GCC. GCC can handle such. Maybe the conversion process you did failed.
GalaG:
Damn, no change... sure I'm not missing some flags?
--- Code: ----------------- Build: Debug in OCCITest ---------------
mingw32-g++.exe -Wall -fexceptions -g -I..\..\XEClient\oci\include -c C:\codeblocksWS\OCCITest\main.cpp -o obj\Debug\main.o
mingw32-g++.exe -L..\..\XEClient\oci\lib\gcc -o bin\Debug\OCCITest.exe obj\Debug\main.o ..\..\XEClient\oci\lib\msvc\oraocci10.lib ..\..\XEClient\oci\lib\msvc\oci.lib ..\..\XEClient\oci\lib\msvc\ociw32.lib
obj\Debug\main.o: In function `main':
C:/codeblocksWS/OCCITest/main.cpp:43: undefined reference to `oracle::occi::SQLException::SQLException(oracle::occi::SQLException const&)'
C:/codeblocksWS/OCCITest/main.cpp:45: undefined reference to `oracle::occi::SQLException::getMessage() const'
C:/codeblocksWS/OCCITest/main.cpp:45: undefined reference to `oracle::occi::SQLException::~SQLException()'
C:/codeblocksWS/OCCITest/main.cpp:45: undefined reference to `oracle::occi::SQLException::~SQLException()'
obj\Debug\main.o: In function `ZN7occidmlC1ESsSsSs':
C:/codeblocksWS/OCCITest/main.cpp:(.text$_ZN7occidmlD1Ev[occidml::~occidml()]+0x2f): undefined reference to `oracle::occi::Environment::terminateEnvironment(oracle::occi::Environment*)'
C:/codeblocksWS/OCCITest/main.cpp:(.text$_ZN7occidmlC1ESsSsSs[occidml::occidml(std::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::basic_string<char, std::char_traits<char>, std::allocator<char> >)]+0x3a): undefined reference to `oracle::occi::Environment::createEnvironment(oracle::occi::Environment::Mode, void*, void* (*)(void*, unsigned int), void* (*)(void*, void*, unsigned int), void (*)(void*, void*))'
collect2: ld returned 1 exit status
Process terminated with status 1 (0 minutes, 2 seconds)
6 errors, 0 warnings
--- End code ---
gee, what's the problem here? I really don't understand this...
still, any ideas?
Gal
MortenMacFly:
--- Quote from: GalaG on May 19, 2009, 09:38:38 pm ---still, any ideas?
--- End quote ---
I told you what to do...Check the symbols with the symbols tables plugin. Did you?!
GalaG:
I found a few in the oraocci10.lib
like this fragment:
--- Code: ---oraocci10.dll:
00000000 I .idata$4
00000000 I .idata$5
00000000 I .idata$6
00000000 T .text
00000000 T ??0BatchSQLException@occi@oracle@@AAE@PAVSQLExceptionImpl@12@@Z
00000000 I __imp_??0BatchSQLException@occi@oracle@@AAE@PAVSQLExceptionImpl@12@@Z
oraocci10.dll:
00000000 I .idata$4
00000000 I .idata$5
00000000 I .idata$6
00000000 T .text
00000000 T ??0BatchSQLException@occi@oracle@@QAE@ABV012@@Z
00000000 I __imp_??0BatchSQLException@occi@oracle@@QAE@ABV012@@Z
oraocci10.dll:
00000000 I .idata$4
00000000 I .idata$5
00000000 I .idata$6
00000000 T .text
00000000 T ??0BatchSQLExceptionImpl@occi@oracle@@QAE@PAX0@Z
00000000 I __imp_??0BatchSQLExceptionImpl@occi@oracle@@QAE@PAX0@Z
--- End code ---
so why can't the linker see them?
thanks for the patience,
Gal
PS: the 'occi....Environment' is also present in the same file.
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version