Paul DuBois wrote:
> At 3:32 AM -0500 7/28/99, Julien CHATELLIER wrote:
> >here is a little programm that i made jut to get used with mysql.
> >#include <stdio.h>
> >#include <mysql.h>
> >MYSQL mysql;
> >mysql_shutdown (&mysql);
> >This is the error i get :
> > gcc -g -o insert insert.o -L/people/julien/mysql504/lib -lmysqlclient
> >-lsocket -lnsl -lm
> >undefined first referenced
> > symbol in file
> >mysql_shutdown insert.o
> >i386ld fatal: Symbol referencing errors. No output written to insert
> >*** Error code 1 (bu21
> >I have installed mysql on SCO OpenServer 5.0.4 and use the
> >mysql-3_22_16a-gamma-pc-sco3_2v5_0_4-i586 version.
> >What am I doing wrong ? Should I use a flags ?...
> >I have seen throu the mailing list archive and the manual that problems can
> >occur with gcc, but in this case, the problem is not at such a low level.
> >At least, if you could give me a way to know the entry points of the
> >libraries, I could see if I am including the good one.
> Does /people/julien/mysql504/lib contain libmysqlclient.a?
> Hm, this looks like the same problem April was having a while ago.
> Wasn't that an SCO system, too?
> Can you compile MySQL from source? It may be the that libraries in
> the binary distribution can't be used properly by your system.
> By the way, I hope you realize that if you get your program linked,
> it will crash as soon as you try to run it. The mysql struct is never
> initialized properly, and you haven't established a connection to the
> server, so you can't tell it to shut down.
Are you using GNU linker? If yes, then try adding -Xlinker --verbose to
the command line and post the output. If this is not a GNU linker, man
ld and see how to make it verbose, and then do -Xlinker
<whater_it_takes_to_make_your_linker_verbose> . It might be worht it
replacing your linker with the one from CNU.