Home » Infrastructure » Unix » (database connection) unresolved sqlcxt
(database connection) unresolved sqlcxt [message #160996] Wed, 01 March 2006 05:51 Go to next message
unixora
Messages: 1
Registered: March 2006
Junior Member
i have a little pro*c code (as shown below)
to connect an oracle database. (in unix solaris platform)
in the preprocessor compilation step everything is ok.
but when i try to compile the code using cc i get the
error below:

ld:
Unresolved:
sqlcxt

i think there is a problem while linking but
i cannot find out whats wrong and what should i do
for fixing.


additional information
(i dont have gcc compiler and i dont have demo folder under the
precomp folder)

(i dont have much knowledge about linking and compiling procedure)
i do the things as follow:
proc dat3.pc
cc dat3.c

here is the code :

EXEC SQL BEGIN DECLARE SECTION;
VARCHAR uid[30];
VARCHAR pwd[30];
EXEC SQL END DECLARE SECTION;

EXEC SQL INCLUDE SQLCA.H;

void main()
{

strcpy(uid.arr,"USER");
uid.len =strlen(uid.arr);
strcpy(pwd.arr,"PASSWD");
pwd.len = strlen(pwd.arr);

EXEC SQL WHENEVER SQLERROR GOTO errexit;
EXEC SQL CONNECT :uid IDENTIFIED BY :pwd;

printf("Connected to Oracle\n");

EXEC SQL COMMIT WORK RELEASE;
return;

errexit:
printf("Connection failed");
return;


} /* end of main */
Re: (database connection) unresolved sqlcxt [message #161187 is a reply to message #160996] Thu, 02 March 2006 08:23 Go to previous message
kshkid
Messages: 24
Registered: November 2005
Junior Member
check for the libraries in precomp/lib/

and the header files to be linked from precomp/public/

can you please post your makefile?
Previous Topic: Encrypt Password to connect to the back-end database
Next Topic: How to find last modified date of a file
Goto Forum:
  


Current Time: Fri Nov 22 09:58:18 CST 2024