4 Replies Latest reply: Jan 19, 2013 1:48 PM by 985919 RSS

    OCCI Link problem (Error LNK2019: unresolved external symbol) in VS2012

    968944
      Hi,
      I'm having a hard time with this. I'm trying to implement OCCI within my application. Error I'm getting is:

      Error     1     error LNK2019: unresolved external symbol "public: static class oracle::occi::Environment * __cdecl oracle::occi::Environment::createEnvironment(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 &,enum oracle::occi::Environment::Mode,void *,void * (__cdecl*)(void *,unsigned int),void * (__cdecl*)(void *,void *,unsigned int),void (__cdecl*)(void *,void *))" (?createEnvironment@Environment@occi@oracle@@SAPAV123@ABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@0W4Mode@123@PAXP6APAX2I@ZP6APAX22I@ZP6AX22@Z@Z) referenced in function "private: bool __thiscall ServerDataLoader::getPreSuffixesFromDB(void)" (?getPreSuffixesFromDB@ServerDataLoader@@AAE_NXZ)     P:\code\VizTool\VizPortal\DwgDgnConverter\ServerDataLoader.obj     DwgDgnConverter

      Error     2     error LNK1120: 1 unresolved externals     P:\code\VizTool\VizPortal\Debug\DwgDgnConverter.exe     1     1     DwgDgnConverter


      Yes, it looks like linking problem,...but for me everything seems set-up.
      - Included header files (from instantclient-sdk-windows.x64-11.2.0.3.0.zip)
      - Included library path from OCCI download (11.2.0.3.0)
      - Added oraocci11d.lib in linker

      Please, what am I doing wrong?
      Millions of thanks for any kind of feedback ;-)
        • 1. Re: OCCI Link problem (Error LNK2019: unresolved external symbol) in VS2012
          jim dc
          Try VS2010 instead. A VS2012 compatible version of OCCI isnt available yet.

          Ref: http://www.oracle.com/technetwork/database/occidownloads-083553.html
          Ref also How can we call methods with unicode support?
          • 2. Re: OCCI Link problem (Error LNK2019: unresolved external symbol) in VS2012
            968944
            thank you for the reply.
            I read on web that it should be possible to run it also on vs2012. Another thing is that I was able to connectto my Oracle DB with VS2012 Tolls--Connect To Database (there I needed to install the ODTwithODAC1120320_32bit package). Maybe those two are fighting with each other? Or do I need to have some extra Path variables for OCCI?
            • 3. Re: OCCI Link problem (Error LNK2019: unresolved external symbol) in VS2012
              jim dc
              Take a look at this link - thats all you should need to do
              http://oradim.blogspot.de/2009/07/getting-started-with-occi-windows.html
              I'd recommend going with VS2010 - whenever you get a problem with VS2012 you'll never be sure.
              • 4. Re: OCCI Link problem (Error LNK2019: unresolved external symbol) in VS2012
                985919
                Have you succeeded? I tried vs2012 and it passed compilation, but gave the run-time error of _crtisvalidheappointer. But the same code runs well with vs2010. I think Oracle needs to publish the new patch for vs2012