0 Replies Latest reply on Apr 7, 2005 6:52 PM by 433814

    Unresolved symbols while linking

    433814
      Hello all,
      I'm toying around with oo4o and I'm having a linking problem. I'm working in VS.NET 2003.

      I added the directories for headers, excutables, libraries, etc. At first I had 9 unresolved symbol errors, but I got it down to 2 by remembering to link with oraclm32.lib (debug copy). Not sure why those 2 errors are still there. My test function is basically the first sample in the Help docs, something like this:

           OStartup();
           ODatabase odb("ora9", "username", "passwd");
           ODynaset odyn(odb, "select * from emp");
           double salary;
           while (!odyn.IsEOF())
           {
           odyn.GetFieldValue("sal", &salary);
      odyn.MoveNext();
           }
           OShutdown();


      The relevant parts of the buildlog. Once I added the additional command line option to link with oraclm32, everything resolved except references to OStartup and OShutdown. Seems odd. Any ideas?


      Buildlog:
      Searching libraries
      Searching C:\oracle\ora92\oo4o\CPP\LIB\oraclm32.lib:
      Found "__declspec(dllimport) public: virtual __thiscall ODatabase::~ODatabase(void)" (__imp_??1ODatabase@@UAE@XZ)
      Referenced in Dataconnect.obj
      Loaded oraclm32.lib(ORACLM32.dll)
      Found "__declspec(dllimport) public: virtual __thiscall ODynaset::~ODynaset(void)" (__imp_??1ODynaset@@UAE@XZ)
      Referenced in Dataconnect.obj
      Loaded oraclm32.lib(ORACLM32.dll)
      Found "__declspec(dllimport) public: int __thiscall ODynaset::MoveNext(int)" (__imp_?MoveNext@ODynaset@@QAEHH@Z)
      Referenced in Dataconnect.obj
      Loaded oraclm32.lib(ORACLM32.dll)
      Found "__declspec(dllimport) public: int __thiscall ODynaset::GetFieldValue(char const *,double *)const " (__imp_?GetFieldValue@ODynaset@@QBEHPBDPAN@Z)
      Referenced in Dataconnect.obj
      Loaded oraclm32.lib(ORACLM32.dll)
      Found "__declspec(dllimport) public: int __thiscall ODynaset::IsEOF(void)const " (__imp_?IsEOF@ODynaset@@QBEHXZ)
      Referenced in Dataconnect.obj
      Loaded oraclm32.lib(ORACLM32.dll)
      Found "__declspec(dllimport) public: __thiscall ODynaset::ODynaset(class ODatabase const &,char const *,long,class OSnapshotID *)" (__imp_??0ODynaset@@QAE@ABVODatabase@@PBDJPAVOSnapshotID@@@Z)
      Referenced in Dataconnect.obj
      Loaded oraclm32.lib(ORACLM32.dll)
      Found "__declspec(dllimport) public: __thiscall ODatabase::ODatabase(char const *,char const *,char const *,long)" (__imp_??0ODatabase@@QAE@PBD00J@Z)
      Referenced in Dataconnect.obj
      Loaded oraclm32.lib(ORACLM32.dll)

      SNIP

      Dataconnect.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) void __fastcall OShutdown(void)" (__imp_?OShutdown@@YIXXZ) referenced in function "long __fastcall PostData(char *)" (?PostData@@YIJPAD@Z)
      Dataconnect.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) int __fastcall OStartup(int)" (__imp_?OStartup@@YIHH@Z) referenced in function "long __fastcall PostData(char *)" (?PostData@@YIJPAD@Z)