Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> undefined reference to 'sqlcxt' when linking?

undefined reference to 'sqlcxt' when linking?

From: Zoran <zoranm_at_echo-on.net>
Date: 1998/03/04
Message-ID: <34FE2FFC.ACB7828E@echo-on.net>#1/1

Hi, I'm working on NT 4.0 with Pro-C for Oracle 8 on NT. Thanks to the other people that helped me get by the pre-compiler complaining about undefined identifiers. I'm beginning to think that the pre-compiler on NT is different than the one for AIX. On AIX I can get away with using #include <sqlca.h> and not having "exec sql begin declare section;" around my host variables, or maybe it's a more customized environment; but I digress from the problem I now have.

My rather simple program now compiles. By the way, I'm using the gnu C compiler for NT which comes with the gnu ld linker for NT. I firstly had trouble with the names of the 2 library files that came with pro-C. They are named SQLLIB80.LIB and SQXLIB80.LIB. I had to copy them to libsql.a and libsqx.a, that's how archives are named in the unix world.

So, once I did that the gnu linker complains about the undefined reference to 'sqlcxt'.

So has anyone successfully built pro-C programs on NT with the GNU compiler/linker? Does it work? From my experience, whether I use a Microsoft or Borland or GNU compiler/linker with pro-C, it shouldn't matter. I am either doing something wrong or it does matter.

The gcc command I'm using is:

gcc -o x -L ./ -lsql -lsqx x.c

In the current directory I have libsql.a and libsqx.a.

The exact error I get back is:

C:\TEMP\cc0012451.o(.text+0x25e):x.c: undefined reference to `sqlcxt' gcc: Internal compiler error: program ld got fatal signal 1

Thanks again, Zoran. Received on Wed Mar 04 1998 - 00:00:00 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US