DwayneZandbergen
asked on
Compiling and linking a Pro*C application with MS Visual C++ and getting sqlcxt errors.
Hello,
I've just ported a C program from VMS to Windows 2000 and have successfully compiled it with the Pro*C compiler that comes with Oracle 9.2.0.x. My program is when I compile and link using Visual C++.... I'm receiving a couple of external reference errors regarding the second function and sqlcxt while linking.
Any ideas? Do you use a make file in Windows or is that exclusive to unix?
Thank-you kindly
I've just ported a C program from VMS to Windows 2000 and have successfully compiled it with the Pro*C compiler that comes with Oracle 9.2.0.x. My program is when I compile and link using Visual C++.... I'm receiving a couple of external reference errors regarding the second function and sqlcxt while linking.
Any ideas? Do you use a make file in Windows or is that exclusive to unix?
Thank-you kindly
You have to add the Pro*C/C++ Library. The guide here might help: http://www.stanford.edu/dept/itss/docs/oracle/10g/win.101/a96111/integrat.htm
you have to include the libraries for the pro*C codes in visual c++ settings
I don't remember the exact names of the libraries, but it named like
orasql???.lib, sql90.lib...
and just exclude the libraries you are already using, if it's ported from the old ora proc codes
srini ms
I don't remember the exact names of the libraries, but it named like
orasql???.lib, sql90.lib...
and just exclude the libraries you are already using, if it's ported from the old ora proc codes
srini ms
ASKER
Please see my errors below - I will try the above suggestion as well.
Thanks,
Dwayne
------ Build started: Project: PSR, Configuration: Debug Win32 ------
Linking...
psr.obj : error LNK2019: unresolved external symbol _sqlcxt referenced in function _pkg_combo
psr.obj : error LNK2019: unresolved external symbol _sleep referenced in function _main
C:\Apps\PSR\PSR\Debug\PSR. exe : fatal error LNK1120: 2 unresolved externals
Build log was saved at "file://c:\Apps\PSR\PSR\PS R\Debug\Bu ildLog.htm "
PSR - 3 error(s), 0 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
Thanks,
Dwayne
------ Build started: Project: PSR, Configuration: Debug Win32 ------
Linking...
psr.obj : error LNK2019: unresolved external symbol _sqlcxt referenced in function _pkg_combo
psr.obj : error LNK2019: unresolved external symbol _sleep referenced in function _main
C:\Apps\PSR\PSR\Debug\PSR.
Build log was saved at "file://c:\Apps\PSR\PSR\PS
PSR - 3 error(s), 0 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
or better to use Sleep with caps S. and you can give in milliseconds there instead of the seconds inside sleep with small s
i think you have to use _sleep inside main instead of simply sleep. or use Sleep with milliseconds
ASKER
Thanks for your help - I needed to include orasql9.lib and modified the code to reference function _sleep.
Thanks again,
Dwayne
Thanks again,
Dwayne
Could you post the errors?
Paul