Steve, 

in this line:
 MYSQLLIBS = -L /work/doctools/mysql-3.23.52/lib -lmysqlclient 

Try eliminating the space between -L and  /work/....
that format always works for me using gcc.

Other than that, I don't see anything that looks wrong.

regis


> From: Steve Cogorno <[EMAIL PROTECTED]>
> To: [EMAIL PROTECTED]
> Subject: Can't link with C API
> Date: 06 Sep 2002 21:19:04 -0700
> 
> >Description:
>       I must be missing something terribly obvious, but I cannot get
>       my client program to link. I get messages like this:
>               ild: (undefined symbol) mysql_free_result -- referenced in the text
segment of dbinterface.o
>       
>       The reference manual says to make sure the -lmysqlclient and -L
>       <path> settings are provided to the linker, which they are.  I've
>       moved these around. I've tried setting the compile to static instead
>       of dynamic link.  None of these seems to help.
>       
>       I'm using the SUNWspro/CC compiler.  I've tried switching to gcc,
>       but I get the same result.
>       
>       I know that the linkers is finding the MySQL libraries because I can
>       see the libmysqlclient.a file being opened when I trace the process
>       with truss.  
>       
>       I appreciate any advice you can provide!
>       
>       Here's the make file:
> 
> CC     = cc
> 
> CFLAGS         = -Dsvr4 -g 
> 
> MYSQLFLAGS =  -I /work/doctools/mysql/include
> MYSQLLIBS = -L /work/doctools/mysql-3.23.52/lib -lmysqlclient 
> 
> INCFLAGS = -I /usr/local/include 
> 
> 
> all: TEST
> 
> clean: 
>       rm *o TEST
> 
> TEST: dbinterface.o TEST.o
>       $(CC) $(CFLAGS) $(INCFLAGS) $(MYSQLLIBS) dbinterface.o TEST.o  -o
TEST
> 
> TEST.o: TEST.c
>       $(CC) $(CFLAGS) $(INCFLAGS) $(MYSQLFLAGS) -c TEST.c -o TEST.o
> 
> dbinterface.o: dbinterface.c
>       $(CC) $(CFLAGS) $(INCFLAGS) $(MYSQLFLAGS) -c dbinterface.c  -o
dbinterface.o
>       9
> 
> 
> >How-To-Repeat:
>       
> >Fix:
>       
> From: Steve Cogorno <[EMAIL PROTECTED]>
> To: [EMAIL PROTECTED]
> Subject: Can't link with C API
> Date: 06 Sep 2002 21:19:04 -0700
> 
> >Description:
>       I must be missing something terribly obvious, but I cannot get
>       my client program to link. I get messages like this:
>               ild: (undefined symbol) mysql_free_result -- referenced in the text
segment of dbinterface.o
>       
>       The reference manual says to make sure the -lmysqlclient and -L
>       <path> settings are provided to the linker, which they are.  I've
>       moved these around. I've tried setting the compile to static instead
>       of dynamic link.  None of these seems to help.
>       
>       I'm using the SUNWspro/CC compiler.  I've tried switching to gcc,
>       but I get the same result.
>       
>       I know that the linkers is finding the MySQL libraries because I can
>       see the libmysqlclient.a file being opened when I trace the process
>       with truss.  
>       
>       I appreciate any advice you can provide!
>       
>       Here's the make file:
> 
> CC     = cc
> 
> CFLAGS         = -Dsvr4 -g 
> 
> MYSQLFLAGS =  -I /work/doctools/mysql/include
> MYSQLLIBS = -L /work/doctools/mysql-3.23.52/lib -lmysqlclient 
> 
> INCFLAGS = -I /usr/local/include 
> 
> 
> all: TEST
> 
> clean: 
>       rm *o TEST
> 
> TEST: dbinterface.o TEST.o
>       $(CC) $(CFLAGS) $(INCFLAGS) $(MYSQLLIBS) dbinterface.o TEST.o  -o
TEST
> 
> TEST.o: TEST.c
>       $(CC) $(CFLAGS) $(INCFLAGS) $(MYSQLFLAGS) -c TEST.c -o TEST.o
> 
> dbinterface.o: dbinterface.c
>       $(CC) $(CFLAGS) $(INCFLAGS) $(MYSQLFLAGS) -c dbinterface.c  -o
dbinterface.o
>       9
> 
> 
> >How-To-Repeat:
>       
> >Fix:
>       > From: Steve Cogorno <[EMAIL PROTECTED]>
> To: [EMAIL PROTECTED]
> Subject: Can't link with C API
> Date: 06 Sep 2002 21:19:04 -0700
> 
> >Description:
>       I must be missing something terribly obvious, but I cannot get
>       my client program to link. I get messages like this:
>               ild: (undefined symbol) mysql_free_result -- referenced in the text
segment of dbinterface.o
>       
>       The reference manual says to make sure the -lmysqlclient and -L
>       <path> settings are provided to the linker, which they are.  I've
>       moved these around. I've tried setting the compile to static instead
>       of dynamic link.  None of these seems to help.
>       
>       I'm using the SUNWspro/CC compiler.  I've tried switching to gcc,
>       but I get the same result.
>       
>       I know that the linkers is finding the MySQL libraries because I can
>       see the libmysqlclient.a file being opened when I trace the process
>       with truss.  
>       
>       I appreciate any advice you can provide!
>       
>       Here's the make file:
> 
> CC     = cc
> 
> CFLAGS         = -Dsvr4 -g 
> 
> MYSQLFLAGS =  -I /work/doctools/mysql/include
> MYSQLLIBS = -L /work/doctools/mysql-3.23.52/lib -lmysqlclient 
> 
> INCFLAGS = -I /usr/local/include 
> 
> 
> all: TEST
> 
> clean: 
>       rm *o TEST
> 
> TEST: dbinterface.o TEST.o
>       $(CC) $(CFLAGS) $(INCFLAGS) $(MYSQLLIBS) dbinterface.o TEST.o  -o
TEST
> 
> TEST.o: TEST.c
>       $(CC) $(CFLAGS) $(INCFLAGS) $(MYSQLFLAGS) -c TEST.c -o TEST.o
> 
> dbinterface.o: dbinterface.c
>       $(CC) $(CFLAGS) $(INCFLAGS) $(MYSQLFLAGS) -c dbinterface.c  -o
dbinterface.o
>       9
> 
> 
> >How-To-Repeat:
>       
> >Fix:
>       

> From: Steve Cogorno <[EMAIL PROTECTED]>
> To: [EMAIL PROTECTED]
> Subject: Can't link with C API
> Date: 06 Sep 2002 21:19:04 -0700
> 
> >Description:
>       I must be missing something terribly obvious, but I cannot get
>       my client program to link. I get messages like this:
>               ild: (undefined symbol) mysql_free_result -- referenced in the text
segment of dbinterface.o
>       
>       The reference manual says to make sure the -lmysqlclient and -L
>       <path> settings are provided to the linker, which they are.  I've
>       moved these around. I've tried setting the compile to static instead
>       of dynamic link.  None of these seems to help.
>       
>       I'm using the SUNWspro/CC compiler.  I've tried switching to gcc,
>       but I get the same result.
>       
>       I know that the linkers is finding the MySQL libraries because I can
>       see the libmysqlclient.a file being opened when I trace the process
>       with truss.  
>       
>       I appreciate any advice you can provide!
>       
>       Here's the make file:
> 
> CC     = cc
> 
> CFLAGS         = -Dsvr4 -g 
> 
> MYSQLFLAGS =  -I /work/doctools/mysql/include
> MYSQLLIBS = -L /work/doctools/mysql-3.23.52/lib -lmysqlclient 
> 
> INCFLAGS = -I /usr/local/include 
> 
> 
> all: TEST
> 
> clean: 
>       rm *o TEST
> 
> TEST: dbinterface.o TEST.o
>       $(CC) $(CFLAGS) $(INCFLAGS) $(MYSQLLIBS) dbinterface.o TEST.o  -o
TEST
> 
> TEST.o: TEST.c
>       $(CC) $(CFLAGS) $(INCFLAGS) $(MYSQLFLAGS) -c TEST.c -o TEST.o
> 
> dbinterface.o: dbinterface.c
>       $(CC) $(CFLAGS) $(INCFLAGS) $(MYSQLFLAGS) -c dbinterface.c  -o
dbinterface.o
>       9
> 
> 
> >How-To-Repeat:
>       
> >Fix:
>       




---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to