473,441 Members | 1,830 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,441 software developers and data experts.

undefined reference to `sqlcxt' (Pro C compilation problem)

Hi
Greetings to all
I am new to ProC. I am compiling a very simple program written in
ProC. I can compile the program using proc filename.pc and it
generates the corresponding c code :) , but when i try to compile the
C program using

cc -O3 -DPRECOMP -I. -I/opt/oracle/products/9.2.0/rdbms/public
-I/opt/oracle/products/9.2.0/precomp/public
-I/opt/oracle/products/9.2.0/rdbms/demo
-I/opt/oracle/products/9.2.0/plsql/public
-I/opt/oracle/products/9.2.0/network/public -DLINUX -D_GNU_SOURCE
-D_GNU_SOURCE -DSLTS_ENABLE -DSLMXMX_ENABLE -D_REENTRANT -DNS_THREADS
-L /opt/oracle/products/9.2.0/precomp/lib/ -L
/opt/oracle/products/9.2.0/lib/ -L
/opt/oracle/products/9.2.0/lib/stubs/ filename.c -ldl -lm -lpthread
-lnsl -o filename

the result is an error reporting LIKE THIS

filename.c: In function `main':
filename.c:152: warning: return type of `main' is not `int'
/tmp/ccoa0TeD.o: In function `main':
/tmp/ccoa0TeD.o(.text+0x143): undefined reference to `sqlcxt'
/tmp/ccoa0TeD.o(.text+0x2e9): undefined reference to `sqlcxt'
collect2: ld returned 1 exit status

I also tried using
make -f /opt/oracle/products/9.2.0/precomp/demo/proc/demo_proc.mk
filename, but here also unfortunately same situation.

Can any one have any idea what can be done??? Thanx in advance.
Ferdous
Jul 19 '05 #1
2 40460
Hi Ferdous,

i assume, your´e compiling on Unix/Linux.
sqlcxt is an external variable defined in libclntsh.so.
Just compile with "-L $(ORACLE_HOME)/lib -l clntsh" and it should
work.

libclntsh.so itself is created at install time by the shell script
$ORACLE_HOME/bin/genclntsh.

Regs, Lothar
Jul 19 '05 #2
jd_hsu
1
Explicitely give the library name in the command line

gcc $ORACLE_HOME/lib/libclntsh.so [...] filename.c
Feb 20 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: shrinivas_bv | last post by:
Hi, Warm greetings. I am new to Pro*C. I am able to compile the pc file to c file. but when I try to compile C file to .o file I am egtting the following error. Unsatisfied symbols: sqlcxt (code)...
1
by: Nelson Teixeira | last post by:
**** Post for FREE via your newsreader at post.usenet.com **** Hello all, I am trying to solve this one for the last two weeks, can someone give me a hand ? I am trranslating an old c++...
7
by: Richard Hayden | last post by:
Hi, I've just upgraded my gcc and I'm currently trying to compile some code for my own operating system kernel, but I am getting an error of "Undefined reference to `memcpy`" when I try to link...
10
by: siroregano | last post by:
Hello- I've got a nice C program written that uses libsndfile (#include <sndfile.h>) to convert my raw data into a properly-formatted wav file. The program is composed of a single .c file that...
1
by: Joseph Geretz | last post by:
Why isn't the ASP.NET runtime providing a valid reference for this object to my WebService? I'm trying to use WSE and DIME to send attachments via Web Service. I've provided a whole lot of...
1
by: Andre Janssen | last post by:
Hi.... I tried to compile the following src with this command: "g++ -Wall -o bla alsaswitch.cpp". The src is an example src of xosd package. #include <xosd.h> int main (int argc, char...
0
by: justarrived | last post by:
Hi, I am working on a Pro-c program on Unix. It compiles/builds properly but while trying to run it I am receiving segmentation violation at- sqlcxt((void **)0, &sqlctx, &sqlstm, &sqlfpn); The...
5
by: druberego | last post by:
I read google and tried to find the solution myself. YES I do know that you can get undefined references if you: a) forget to implement the code for a prototype/header file item, or b) you forget...
1
by: ferdous | last post by:
Hi Greetings to all I am new to ProC. I am compiling a very simple program written in ProC. I can compile the program using proc filename.pc and it generates the corresponding c code :) , but...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.