Home > database >  Vs2010 in Windows 7 64 - bit environment through error accessing Oracle always accounted, how to do?
Vs2010 in Windows 7 64 - bit environment through error accessing Oracle always accounted, how to do?

Time:10-06

1> Test. Obj: error LNK2019: cannot resolve the external symbol of "public: static void __cdecl oracle: : accounted: : Environment: : terminateEnvironment (class: oracle: accounted: : Environment *)" (? TerminateEnvironment @ Environment @ accounted @ oracle @ @ SAXPAV123 @ @ Z), the symbol referenced in function __catch $_wmain $0
1> Test. Obj: error LNK2019: cannot resolve the external symbol of "public: virtual __thiscall oracle: : accounted: : SQLException: : ~ SQLException (void)" (?????? 1 sqlexception @ accounted @ oracle @ @ UAE @ XZ), the symbol referenced in function __catch $_wmain $0
1> Test. Obj: error LNK2019: cannot resolve the external symbol of "public: virtual char const * __thiscall oracle: : accounted: : SQLException: : what (void) const" (? What @ SQLException @ accounted @ @ @ UBEPBDXZ oracle), the symbol referenced in function __catch $_wmain $0
1> Test. Obj: error LNK2019: cannot resolve the external symbol of "public: __thiscall oracle: : accounted: : Date: : ~ Date (void)" (?????? 1 date @ accounted @ oracle @ @ QAE @ XZ), the symbol referenced in the function _wmain
1> Test. Obj: error LNK2019: cannot resolve the external symbol of "public: class STD: : basic_string & lt; Char, struct STD: : char_traits & lt; Char> Class, STD: : allocator & gt; __thiscall oracle: : accounted: : Date: : toText (class STD: : basic_string & lt; Char, struct STD: : char_traits & lt; Char> Class, STD: : allocator & gt; Const & amp; , class STD: : basic_string & lt; Char, struct STD: : char_traits & lt; Char> Class, STD: : allocator & gt; Const & amp;) Const (?" ToText @ Date @ accounted @ @ @ QBE oracle? AV? $basic_string @ DU? $char_traits @ D @ STD @ @ V? $allocator @ @ 2 D @ @ STD @ @ ABV45 @ @ 0 Z), the symbol referenced in the function _wmain
1> Test. Obj: error LNK2019: cannot resolve the external symbol of "public: static class: oracle: accounted: : Environment * __cdecl oracle: : accounted: : Environment: : createEnvironment (enum oracle: : accounted: : Environment: : Mode, void *, void * (__cdecl *) (void *, unsigned int), void * (__cdecl *) (void *, void *, unsigned int), the void (__cdecl *) (void *, void *))" (? CreateEnvironment @ Environment @ accounted @ oracle @ @ SAPAV123 @ W4Mode @ @ @ PAXP6APAX1I @ ZP6APAX11I @ ZP6AX11 @ 123 Z Z), the symbol referenced in the function _wmain
1> C: \ Users \ \ Administrator \ Desktop \ accounted \ Test \ Debug \ Test. Exe: fatal error LNK1120: six cannot resolve external commands

CodePudding user response:

//Test. The CPP: defines the entry point of the console application,
//
# pragma once
# include "stdafx. H"

# include "is accounted. H"
# include "occiCommon. H"
# include "occiControl. H"
# include "occiData. H"
# include "occiObjects. H"

#include
#include

# pragma comment (lib, "oraocci11d. Lib")
//# pragma comment (lib, "D: \ \ accounted \ \ instantclient_11_2 \ \ SDK \ \ lib \ \ MSVC \ \ vc10oraocci11d lib")
using namespace std;
Using the namespace: oracle: accounted;

Int _tmain (int arg c, _TCHAR * argv [])
{
Cout<& lt;" Hello accounted "& lt;
Const string userName="system";
Const string passWord="admin123";
Const string osid="sysdba";
The Environment * const env=Environment: : createEnvironment ();
Int ret=0;

Try
{
The Connection * const con=env - & gt; The createConnection (userName, passWord, osid);
Cout & lt; <"Connected as" & lt; The Statement * STMT=con - & gt; CreateStatement (" Select sysdate from dual ");
The ResultSet=STMT - * rs & gt; ExecuteQuery ();
Rs - & gt; next();
The Date dt=rs - & gt; GetDate (1);
Cout & lt; <"The Date now in the database:" & lt; Cout & lt; <"Closing the connection." & lt; Env - & gt; TerminateConnection (con);
}
The catch (SQLException ea)
{
Cerr & lt; <"Can 't connect:" & lt; Ret=1;
}
Environment: : terminateEnvironment (env);

system("pause");
return 0;
}

CodePudding user response:

Don't have the ORACLE error message ah, VS look not to understand

CodePudding user response:

The building Lord, please the problem solved? I got stuck with this problem for several days!
  • Related