windwos下如何编译proc程序?
我的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
请高手指教。
问题点数:50、回复次数:5Top
1 楼rady88(猫)回复于 2002-09-19 12:52:28 得分 0
Oracle提供了库函数,安装pro*后就有。
找到它,编译时加上就行了。
Top
2 楼chenglun(忘川)回复于 2002-09-20 10:01:29 得分 0
到底缺少哪些库?我把percomp和oci里的 *.h 全拷到Turbor C的include目录下了,还是不行。编译时应该加上哪些?Top
3 楼ljy_fz(驿动的心)回复于 2002-09-20 12:48:01 得分 10
我是TUXEDO程序员听我的没错:
你还要一个oraSQL8.LIBTop
4 楼sxychee(一笑)回复于 2002-09-20 23:14:47 得分 0
我用的是OpenVMS操作系统,这个问题也正在考虑之中,我已成功预编译,编译,但连接出错,找不到库文件 ,OpenVMS中的库文件为*.olb,但有好多,我不知道该要哪一个,也不知道Compaq C中如何包含ORACLE的库文件。Top
5 楼webmin(webmin)回复于 2002-09-24 09:53:34 得分 40
你把下面这段内容做成一个BAT文件,调用时msmakes.bat myproc.hc
rem - 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
Top





