Urgent! 0711-317 ERROR: Undefined symbol: ...
Date: 23 May 2002 07:25:36 -0700
Message-ID: <8aa832bc.0205230625.5c8e0039_at_posting.google.com>
Hi!
I've tried to compile my simple test-file ...
LONDON ferkms> make -f proc.mk test
Please help! If you need something more to know about my environment,
reply to this posting!
Oliver
Here is the Test-File:
struct telegramm
char satzart[3];
/*
char datum[30];
void sql_error(msg)
char *msg;
char err_msg[512];
EXEC SQL WHENEVER SQLERROR CONTINUE;
printf("\n%s\n", msg);
buf_len = sizeof (err_msg);
EXEC SQL ROLLBACK RELEASE;
void main()
struct telegramm *telegramm_ptr;
if ((telegramm_ptr = (struct telegramm *) malloc(sizeof(struct
telegramm))) == 0)
{
EXEC SQL WHENEVER SQLERROR DO sql_error("ORACLE error--");
EXEC SQL CONNECT :username IDENTIFIED BY :password AT :database;
printf("\nConnected to ORACLE as user: %s\n", username);
EXEC SQL DECLARE telegramme CURSOR FOR
/home/app/oracle/product/8.1.7/bin/oraxlc -O3 -I.
-L/home/app/oracle/product/8.1.7/precomp/lib/
-I/home/app/oracle/product/8.1.7/precomp/public
-I/home/app/oracle/product/8.1.7/rdbms/public
-I/home/app/oracle/product/8.1.7/rdbms/demo
-I/home/app/oracle/product/8.1.7/plsql/public
-I/home/app/oracle/product/8.1.7/network/public -o test
-L/home/app/oracle/product/8.1.7/lib/ test.c -o test
ld: 0711-317 ERROR: Undefined symbol: .sqlcxt
ld: 0711-317 ERROR: Undefined symbol: .sqlglm
ld: 0711-345 Use the -bloadmap or -bnoquiet option to obtain more
information.
make: 1254-004 The error code from the last command is 8.
#include <sqlca.h>
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <sqlda.h>
#include <sqlcpr.h>
{
char daten[1024];
};
char laenge[5];
*/
{
size_t buf_len, msg_len;
sqlglm(err_msg, &buf_len, &msg_len);
printf("%.*s\n", msg_len, err_msg);
exit(EXIT_FAILURE);
}
{
char username[6];
char password[10];
char database[10];
fprintf(stderr, "Memory allocation error.\n");
exit(EXIT_FAILURE);
}
strcpy(username, "abc");
strcpy(password, "abc");
strcpy(database, "abc");
SELECT SATZART, DATEN
FROM HST_SEND;
/* , to_char(NEWDAT,'DD.MM.YYYY HH:MM:SS'), to_char(LENGTH(DATEN)) */
EXEC SQL OPEN telegramme;
EXEC SQL WHENEVER NOT FOUND DO break;
for (;;)
{
EXEC SQL FETCH telegramme INTO :telegramm_ptr; printf("%s %s %s %s\n", telegramm_ptr->satzart,telegramm_ptr->daten); /* printf("%s %s %s %s\n", telegramm_ptr->satzart,telegramm_ptr->datum,telegramm_ptr->laenge,telegramm_ptr->daten); */
}
EXEC SQL CLOSE telegramme;
EXEC SQL COMMIT WORK RELEASE;
exit(EXIT_SUCCESS);
}
Received on Thu May 23 2002 - 16:25:36 CEST