Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Compiling and linking a Pro*C application with MS Visual C++ and getting sqlcxt errors.

Posted on 2006-07-19
8
Medium Priority
?
2,168 Views
Last Modified: 2008-01-09
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
0
Comment
Question by:DwayneZandbergen
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
8 Comments
 
LVL 16

Expert Comment

by:PaulCaswell
ID: 17141989
Hi DwayneZandbergen,

Could you post the errors?

Paul
0
 
LVL 24

Expert Comment

by:slyong
ID: 17143335
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
0
 
LVL 3

Expert Comment

by:srinims
ID: 17143748
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
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 1

Author Comment

by:DwayneZandbergen
ID: 17145466
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\PSR\Debug\BuildLog.htm"
PSR - 3 error(s), 0 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
0
 
LVL 3

Accepted Solution

by:
srinims earned 2000 total points
ID: 17146118
you need to include orasql.lib.

and you have to give the path for the orasql.lib in the tools/options/include directories

or you can directly give the fullpath in the input in the link tab of project settings

for the sleep function you have to include the file unistd.h


0
 
LVL 3

Expert Comment

by:srinims
ID: 17146141
or better to use Sleep with caps S. and you can give in milliseconds there instead of the seconds inside sleep with small s
0
 
LVL 3

Expert Comment

by:srinims
ID: 17146179
i think you have to use _sleep inside main instead of simply sleep. or use Sleep with milliseconds
0
 
LVL 1

Author Comment

by:DwayneZandbergen
ID: 17146939
Thanks for your help - I needed to include orasql9.lib and modified the code to reference function _sleep.

Thanks again,

Dwayne
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Have you thought about creating an iPhone application (app), but didn't even know where to get started? Here's how: ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ Important pre-programming comments: I’ve never tri…
Summary: This tutorial covers some basics of pointer, pointer arithmetic and function pointer. What is a pointer: A pointer is a variable which holds an address. This address might be address of another variable/address of devices/address of fu…
The goal of this video is to provide viewers with basic examples to understand how to use strings and some functions related to them in the C programming language.
The goal of this video is to provide viewers with basic examples to understand and use conditional statements in the C programming language.
Suggested Courses

618 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question