Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

pro*c compile/linkage question

Status
Not open for further replies.

DoraC

Programmer
May 7, 2002
98
US
Hi,

I'm doing the following on a HP9000 Unix server...

I have two c source files I need to compile together - one is output from the pro*c precompiler (call it ProC.c), and a non-precompiled c source file (call it Prog.c - no main(), just functions).

When I compile this as follows:
Code:
cc -I "/path/for/Prog.c/compilation" Prog.c ProC.c -o Executable

I get the following errors:
Code:
/usr/ccs/bin/ld: Unsatisfied symbols:
   sqlorat (first referenced in ProC.o) (code)
   sqlcxt (first referenced in ProC.o) (code)

I assume there are libraries i'm missing that need to be included, or something like that. Does anyone know what I'm missing here? This is very frustrating, and unfortunately it's something I need to resolve rather quickly.

Any help greatly appreciated,
dora c
 
You need to include an [tt]-I $(ORACLE_HOME)/sqllib[/tt] line, or similar, in your make file. This is the location of the necessary libraries.
 
Thanks for the reply!

So, my efforts to -I include those libraries when I was doing my cc compile AFTER I had run the make file to produce the .c file were in error... I should be including that IN the make file.

Does anybody have a good, sample makefile that would allow me to produce only a .c file, w/o the associated executable? We're working with the Oracle supplied defaults and I've (frustratingly) as of yet been unable to build one on my own to do this - produce a .c file that will compile cleanly (i.e. w/o the errors that motivated this thread.

Thank you very much!
dora c
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top