Re: Urgent! 0711-317 ERROR: Undefined symbol: ...

From: Oliver Kramer <kramer.haine_at_t-online.de>
Date: 23 May 2002 23:00:55 -0700
Message-ID: <8aa832bc.0205232200.29a701c3_at_posting.google.com>


Hi!

I've found, what's going wrong ...

> EXEC SQL DECLARE telegramme CURSOR FOR
> SELECT SATZART, DATEN
> FROM HST_SEND;
It should have been the following, which was wrong ...

> EXEC SQL DECLARE telegramme CURSOR FOR
> SELECT SATZART, length(DATEN), DATEN
> FROM HST_SEND;
Don't know, why I got problems by compiling the first one?! I got an oracle example (sample2.pc) and modified it.

Solution: You don't have to take functions in SELECT Statement. If you still want to work with calculated data, you have to create a view ...

Bye!

Oliver

kramer.haine_at_t-online.de (Oliver Kramer) wrote in message news:<8aa832bc.0205230625.5c8e0039_at_posting.google.com>...
> Hi!
>
> I've tried to compile my simple test-file ...
>
> LONDON ferkms> make -f proc.mk test
> /home/app/oracle/product/8.1.7/bin/oraxlc -O3 -I.
> -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/precomp/lib/
> -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.
>
> Please help! If you need something more to know about my environment,
> reply to this posting!
>
>
> Oliver
>
> Here is the Test-File:
>
> #include <sqlca.h>
> #include <stdio.h>
> #include <string.h>
> #include <stdlib.h>
> #include <sqlda.h>
> #include <sqlcpr.h>
>
> struct telegramm
> {
> char satzart[3];
> char daten[1024];
> };
>
> /*
> char datum[30];
> char laenge[5];
> */
>
> void sql_error(msg)
> char *msg;
> {
> char err_msg[512];
> size_t buf_len, msg_len;
>
> EXEC SQL WHENEVER SQLERROR CONTINUE;
>
> printf("\n%s\n", msg);
>
> buf_len = sizeof (err_msg);
> sqlglm(err_msg, &buf_len, &msg_len);
> printf("%.*s\n", msg_len, err_msg);
>
> EXEC SQL ROLLBACK RELEASE;
> exit(EXIT_FAILURE);
> }
>
> void main()
> {
> char username[6];
> char password[10];
> char database[10];
>
> struct telegramm *telegramm_ptr;
>
> if ((telegramm_ptr = (struct telegramm *) malloc(sizeof(struct
> telegramm))) == 0)
> {
> fprintf(stderr, "Memory allocation error.\n");
> exit(EXIT_FAILURE);
> }
>
> strcpy(username, "abc");
> strcpy(password, "abc");
> strcpy(database, "abc");
>
>
> 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
> 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 Fri May 24 2002 - 08:00:55 CEST

Original text of this message