I'm trying to compile SOCI (http://soci.sourceforge.net/) which use OCI (Oracle Call Interface) under windows.
Details: Visual studio 2012, Oracle version 11.2.0; 64 bit
I found $(ORCALE_HOME)/OCI/LIB/MSVC
libraries. But it won't like (I tried both oraocci11.lib
and oci.lib
.
The linkage error I get:
2>blob.obj : error LNK2019: unresolved external symbol _OCIDescriptorAlloc referenced in function "public: __thiscall soci::oracle_blob_backend::oracle_blob_backend(struct soci::oracle_session_backend &)" (??0oracle_blob_backend@soci@@QAE@AAUoracle_session_backend@1@@Z)
2>row-id.obj : error LNK2001: unresolved external symbol _OCIDescriptorAlloc
2>blob.obj : error LNK2019: unresolved external symbol _OCIDescriptorFree referenced in function "public: virtual __thiscall soci::oracle_blob_backend::~oracle_blob_backend(void)" (??1oracle_blob_backend@soci@@UAE@XZ)
2>row-id.obj : error LNK2001: unresolved external symbol _OCIDescriptorFree
2>blob.obj : error LNK2019: unresolved external symbol _OCILobGetLength referenced in function "public: virtual unsigned int __thiscall soci::oracle_blob_backend::get_len(void)" (?get_len@oracle_blob_backend@soci@@UAEIXZ)
2>blob.obj : error LNK2019: unresolved external symbol _OCILobRead referenced in function "public: virtual unsigned int __thiscall soci::oracle_blob_backend::read(unsigned int,char *,unsigned int)" (?read@oracle_blob_backend@soci@@UAEIIPADI@Z)
2>blob.obj : error LNK2019: unresolved external symbol _OCILobTrim referenced in function "public: virtual void __thiscall soci::oracle_blob_backend::trim(unsigned int)" (?trim@oracle_blob_backend@soci@@UAEXI@Z)
2>blob.obj : error LNK2019: unresolved external symbol _OCILobWrite referenced in function "public: virtual unsigned int __thiscall soci::oracle_blob_backend::write(unsigned int,char const *,unsigned int)" (?write@oracle_blob_backend@soci@@UAEIIPBDI@Z)
2>blob.obj : error LNK2019: unresolved external symbol _OCILobWriteAppend referenced in function "public: virtual unsigned int __thiscall soci::oracle_blob_backend::append(char const *,unsigned int)" (?append@oracle_blob_backend@soci@@UAEIPBDI@Z)
2>error.obj : error LNK2019: unresolved external symbol _OCIErrorGet referenced in function "void __cdecl soci::details::oracle::get_error_details(int,struct OCIError *,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > &,int &)" (?get_error_details@oracle@details@soci@@YAXHPAUOCIError@@AAV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@AAH@Z)
2>session.obj : error LNK2019: unresolved external symbol _OCIEnvCreate referenced in function "public: __thiscall soci::oracle_session_backend::oracle_session_backend(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,int,bool)" (??0oracle_session_backend@soci@@QAE@ABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@00H_N@Z)
2>session.obj : error LNK2019: unresolved external symbol _OCIHandleAlloc referenced in function "public: __thiscall soci::oracle_session_backend::oracle_session_backend(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,int,bool)" (??0oracle_session_backend@soci@@QAE@ABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@00H_N@Z)
2>statement.obj : error LNK2001: unresolved external symbol _OCIHandleAlloc
2>vector-into-type.obj : error LNK2001: unresolved external symbol _OCIHandleFree
2>vector-use-type.obj : error LNK2001: unresolved external symbol _OCIHandleFree
2>session.obj : error LNK2019: unresolved external symbol _OCIHandleFree referenced in function "public: void __thiscall soci::oracle_session_backend::clean_up(void)" (?clean_up@oracle_session_backend@soci@@QAEXXZ)
2>standard-into-type.obj : error LNK2001: unresolved external symbol _OCIHandleFree
2>standard-use-type.obj : error LNK2001: unresolved external symbol _OCIHandleFree
Any Ideas? I'm really stuck on that one.
Thanks, Guy
Well, I found eventually a
oci.lib
that I can link against ("Instant Client Package")http://www.oracle.com/technetwork/topics/winsoft-085727.html