This discussion is archived
5 Replies Latest reply: Mar 28, 2013 12:30 PM by 969939 RSS

How to compile Pro*C

825196 Newbie
Currently Being Moderated
Hi,

I need a help, am new to Pro*c,

I am working on windows XP and oracle 11i.

I create and precompile the little code and try to generated .c with the VC++ 2005. Getting error message.

Included header: oracle\product\11.1.0\client_1\precomp\public
Additional lib dir:
oracle\product\11.1.0\client_1\precomp\LIB\orasql11.lib
oracle\product\11.1.0\client_1\RDBMS\XA\oraxa11.lib
oracle\product\11.1.0\client_1\oci\lib\msvc\oci.lib
oracle\product\11.1.0\client_1\precomp\LIB\msvc\orasqx11.lib


--------------------------------------------------------------------------------
Build started: Project: MyCProject, Configuration: Debug Win32
--------------------------------------------------------------------------------
1>Linking...
1>PC.obj : error LNK2019: unresolved external symbol sqlcxt referenced in function main
1>C:\Documents and Settings\user1\My Documents\Visual Studio 2005\Projects\PC\Debug\PC.exe : fatal error LNK1120: 1 unresolved externals
1>Build log was saved at "file://c:\Documents and Settings\user1\My Documents\Visual Studio 2005\Projects\PC\PC\Debug\BuildLog.htm"
1>PC - 2 error(s), 4 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

Edited by: user13510690 on Dec 19, 2010 11:04 PM
  • 1. Re: How to compile Pro*C
    Herald ten Dam Expert
    Currently Being Moderated
    Hi,

    have a look at note 1223643.1 on Oracle Support: "Visual Studio Link Error - Unresolved External Symbol _sqlcxt sqlcxt - When Compiling a Pro*C Application".

    Herald ten Dam
    http://htendam.wordpress.com
  • 2. Re: How to compile Pro*C
    825196 Newbie
    Currently Being Moderated
    Thanks Herald!!

    I go the solution
    In VC++ 2005 we need to add

    C/C++->General:
    Additional include dir
    oracle\product\11.1.0\client_1\precomp\public

    Linker->General->
    Additional lib dir:
    oracle\product\11.1.0\client_1\precomp\LIB
    oracle\product\11.1.0\client_1\RDBMS\XA
    oracle\product\11.1.0\client_1\oci\lib\msvc
    oracle\product\11.1.0\client_1\precomp\LIB\msvc

    Linker->Input->Additional dependecies
    orasql11.lib
    oraxa11.lib
    oci.lib
    orasqx11.lib
  • 3. Re: How to compile Pro*C
    835550 Newbie
    Currently Being Moderated
    Hi,
    I am also facing this same issue. Please let me know where we have to make these changes?
  • 4. Re: How to compile Pro*C
    825196 Newbie
    Currently Being Moderated
    VC++ 2005:
    we nned to modify below

    Visual Studio 2005

    C/C++->General:
    Additional include dir
    oracle\product\11.1.0\client_1\precomp\public

    Linker->General->
    Additional lib dir:
    oracle\product\11.1.0\client_1\precomp\LIB
    oracle\product\11.1.0\client_1\RDBMS\XA
    oracle\product\11.1.0\client_1\oci\lib\msvc
    oracle\product\11.1.0\client_1\precomp\LIB\msvc

    Linker->Input->Additional dependecies
    orasql11.lib
    oraxa11.lib
    oci.lib
    orasqx11.lib
  • 5. Re: How to compile Pro*C
    969939 Newbie
    Currently Being Moderated
    The 10G version (orasql10.lib) seems to contain the function headers. But the 11G version (orasql11.lib) does not seem to have them. Not sure if they were deleted on purpose/renamed or what happened, but I'd sure like to find them. Otherwise I'll have to go back to using the 10G version of the precompiler.

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points