Skip to Main Content

DevOps, CI/CD and Automation

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Unresolved externals compiling OCI prog in MS VC++

Roger Ford-OracleApr 16 2012 — edited Apr 17 2012
I first asked this on the occi forum but no answers - perhaps this is a more appropriate place for it.

DB: 11.2.0.3 EE 64
OS: Windows 7 Pro 64
Visual C++ 2008 (also tried 2010)

I'm trying to build a Win32 console program from a OCI c source file which worked fine on Linux.
After some messing around, it compiles fine but I can't get it to link. I get:

1>Linking...
1>randomtext.obj : error LNK2001: unresolved external symbol _OCIInitialize
1>randomtext.obj : error LNK2001: unresolved external symbol _OCIEnvInit
1>randomtext.obj : error LNK2001: unresolved external symbol _OCIHandleAlloc
1>randomtext.obj : error LNK2001: unresolved external symbol _OCILogon
1>randomtext.obj : error LNK2001: unresolved external symbol _OCIErrorGet
1>randomtext.obj : error LNK2001: unresolved external symbol _OCIStmtPrepare
1>randomtext.obj : error LNK2001: unresolved external symbol _OCIStmtExecute
1>randomtext.obj : error LNK2001: unresolved external symbol _OCIBindByName
1>randomtext.obj : error LNK2001: unresolved external symbol _OCITransCommit
1>D:\Users\raford\Documents\Visual Studio 2008\Projects\randomtext\Release\randomtext.exe : fatal error LNK1120: 9 unresolved externals
1>Build log was saved at "file://d:\Users\raford\Documents\Visual Studio 2008\Projects\randomtext\randomtext\Release\BuildLog.htm"

In my project properties, Linker Section I have:

General: Additional Library Directories: D:\oracle\product\11.2.0\dbhome_1\OCI\lib\MSVC
Input: Additional Dependencies: oci.lib

I believe this should be sufficient to resolve these dependencies. Anyone know what I'm doing wrong?

I've uploaded the build log to:

http://dl.dropbox.com/u/21167892/BuildLog.htm

Appreciate any help.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on May 15 2012
Added on Apr 16 2012
1 comment
814 views