473,395 Members | 1,521 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,395 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 40440
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...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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
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...

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.