我的oracle服务端在windwos2000平台下,
我写了一段proc程序——employee.pc
用 c:\>proc iname=employee MODE=ORACLE
后成功生成了employee.c文件。
请问再怎样处理才能生成可执行文件?
我的机器上有VC和Turbor C我用tc编译时总出现连接错误,如下:
 Compiling E:\PROC\EMPLOYEE.C:
 Linking D:\TURBOC2\EMPLOYEE.EXE:
 Linker Error: Undefined symbol '__setargv' in module C0S
 Linker Error: Undefined symbol '__setenvp' in module C0S
 Linker Error: Undefined symbol '_sqlglm' in module EMPLOYEE.C
 Linker Error: Undefined symbol '_sqlcxt' in module EMPLOYEE.C
 Linker Error: Undefined symbol '__exitclean' in module EXIT请高手指教。

解决方案 »

  1.   

    Oracle提供了库函数,安装pro*后就有。
    找到它,编译时加上就行了。
      

  2.   

    到底缺少哪些库?我把percomp和oci里的 *.h 全拷到Turbor C的include目录下了,还是不行。编译时应该加上哪些?
      

  3.   

    我是TUXEDO程序员听我的没错:
    你还要一个oraSQL8.LIB
      

  4.   

    我用的是OpenVMS操作系统,这个问题也正在考虑之中,我已成功预编译,编译,但连接出错,找不到库文件 ,OpenVMS中的库文件为*.olb,但有好多,我不知道该要哪一个,也不知道Compaq C中如何包含ORACLE的库文件。
      

  5.   

    你把下面这段内容做成一个BAT文件,调用时msmakes.bat myproc.hcrem - Build-File for C (/ C++) Programs w. MS Vis.C++ Compiler -\
    rem - Builds Progr. w. (Oracle9i) embedded SQL -\
    rem ------------------------------------------------------------\
    rem Usage: msmakes <prog_name>
    proc iname=%1.pc
    rem Compile and link the program.
    rem ????? To build a C++ program, change the source file extension to 
    rem and include the -Tp option.
    rem Include other libraries at the end of the link-command !
    cl -Id:\Oracle\Ora90\oci\include -Id:\Oracle\Ora90\precomp\public -I. -I%MSVCDir%\include -D_MT -D_DLL -Zi %1.c /link d:\Oracle\Ora90\precomp\lib\msvc\oraSQL9.LIB  /LIBPATH:%MSVCDir%\lib msvcrt.lib /nod:libc