Warning: file_get_contents(/data/phpspider/zhask/data//catemap/6/cplusplus/127.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C++ OCI(Oracle调用接口)链接错误-visual studio 2012_C++_Oracle_Oracle Call Interface_Soci - Fatal编程技术网

C++ OCI(Oracle调用接口)链接错误-visual studio 2012

C++ OCI(Oracle调用接口)链接错误-visual studio 2012,c++,oracle,oracle-call-interface,soci,C++,Oracle,Oracle Call Interface,Soci,我正在尝试编译SOCI(),它在windows下使用OCI(Oracle调用接口) 详细信息:Visual studio 2012,Oracle版本11.2.0;64位 我找到了$(ORCALE_HOME)/OCI/LIB/MSVC库。但它不会喜欢(我尝试了oraocci11.lib和oci.lib) 我得到的链接错误是: 2>blob.obj : error LNK2019: unresolved external symbol _OCIDescriptorAlloc reference

我正在尝试编译SOCI(),它在windows下使用OCI(Oracle调用接口)

详细信息:Visual studio 2012,Oracle版本11.2.0;64位

我找到了
$(ORCALE_HOME)/OCI/LIB/MSVC
库。但它不会喜欢(我尝试了
oraocci11.lib
oci.lib

我得到的链接错误是:

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
2>blob.obj:错误LNK2019:未解析的外部符号OCIDescriptorAlloc在函数“public:uu thiscall soci::oracle\u blob\u backend::oracle\u blob\u backend(struct soci::oracle\u session\u backend&)”中引用(??0oracle\u blob_backend@soci@@QAE@AAUoracle_session_backend@1@@Z)
2> row-id.obj:错误LNK2001:未解析的外部符号_ocDescriptorAlloc
2> blob.obj:错误LNK2019:函数“public:virtual\uu thiscall soci::oracle\u blob\u backend::~oracle\u blob\u backend(void)”中引用了未解析的外部符号OCIDescriptorFree(_backend@soci@@UAE@XZ)
2> row-id.obj:错误LNK2001:未解析的外部符号_ocDescriptorFree
2> blob.obj:错误LNK2019:函数“public:virtual unsigned int\uu thiscall soci::oracle\u blob\u backend::get\u len(void)”中引用了未解析的外部符号_OCILobGetLength)(?get_len@oracle_blob_backend@社会@@UAEIXZ)
2> blob.obj:错误LNK2019:函数“public:virtual unsigned int\uu thiscall soci::oracle\u blob\u backend::read(unsigned int,char*,unsigned int)”中引用了未解析的外部符号\u OCILobRead)(?read@oracle_blob_backend@社会@@UAEIIPADI@Z)
2> blob.obj:错误LNK2019:函数“public:virtual void\u thiscall soci::oracle\u blob\u backend::trim(unsigned int)”中引用了未解析的外部符号OCILobTrim)(?trim@oracle_blob_backend@社会@@UAEXI@Z)
2> blob.obj:错误LNK2019:函数“public:virtual unsigned int\uu thiscall soci::oracle\u blob\u backend::write(unsigned int,char const*,unsigned int)”中引用了未解析的外部符号OCILobWrite)(?write@oracle_blob_backend@社会@@UAEIIPBDI@Z)
2> blob.obj:错误LNK2019:函数“public:virtual unsigned int\uu thiscall soci::oracle\u blob\u backend::append(char const*,unsigned int)”中引用了未解析的外部符号OCILobWriteAppend)(?append@oracle_blob_backend@社会@@UAEIPBDI@Z)
2> error.obj:error LNK2019:未解析的外部符号OCIRRORGET在函数“void uu cdecl soci::details::oracle::get error details(int,struct OCIRROR*,class std::basic_string&,int&)”中引用(?get error_details@oracle@details@soci@@yaxhpaucierror@@AAV?$basic_string@DU?$char_traits@D@性病病毒$allocator@D@2@@std@@AAH@Z)
2> session.obj:错误LNK2019:函数“public:”中引用的未解析外部符号_ocienCreate::oracle_会话_后端::oracle_会话_后端(类std::basic_字符串常量&,类std::basic_字符串常量&,类std::basic_字符串常量&,int,bool)(?0 Oracle_会话)_backend@soci@@QAE@ABV?$basic_string@DU?$char_traits@D@性病病毒$allocator@D@2@@std@@00H_N@Z)
2> session.obj:错误LNK2019:函数“public:”中引用了未解析的外部符号“\u OCIHandleAlloc::oracle\u session\u backend::oracle\u session\u backend”(class std::basic\u string const&,class std::basic\u string const&,class std::basic\u string const&,int,bool)(?0 Oracle_会话)_backend@soci@@QAE@ABV?$basic_string@DU?$char_traits@D@性病病毒$allocator@D@2@@std@@00H_N@Z)
2> statement.obj:错误LNK2001:未解析的外部符号
2> vector-into-type.obj:错误LNK2001:未解析的外部符号_ocHandleFree
2> vector-use-type.obj:错误LNK2001:未解析的外部符号_ocHandleFree
2> session.obj:错误LNK2019:函数“public:void\uu thiscall soci::oracle\u session\u backend::clean\u up(void)”中引用的未解析外部符号\u OCIHandleFree(?clean_up@oracle_session_backend@soci@@qaexz)
2> standard-into-type.obj:错误LNK2001:未解析的外部符号_ocHandleFree
2> standard-use-type.obj:错误LNK2001:未解析的外部符号_ocHandleFree
有什么想法吗?我真的很想知道


谢谢,盖伊,我终于找到了一个可以链接的
oci.lib
(“即时客户端包”)

请注意,这只是一个“import.lib”,而不是一个“static.lib”。在运行时(在路径中),您还需要.dll。