List:General Discussion« Previous MessageNext Message »
From:Gerald Clark Date:July 9 1999 7:18pm
Subject:Re: Fw: ./configure problems during 3.21.33b install
View as plain text  
To link in the libmysqlclient you should be using
-lmysqlclient, not -llibmysqlclient.
The "lib" portion is assumed by the linker.

April Escamilla wrote:
> 
>  Sasha,
> 
>            Our main goal here is to be able to compile programs written in C
>   using the mysql.a libraries.  We would like to know:
>           1)  Is there a way to compile just the mysql libraries using a
>   regular C compiler?
>           2)  Is there a way to link the .a's that were downloaded in the
>   "mysql-3.21.33b.tar.gz" file with a program that I wrote and compiled in
>  straight C?
>             2.1)  Are the libraries that I got in the download compiled in
>  C++ and, if so, is that why when I link my C program (.o) with these
>  downloaded .a's - the linker doesn't see the functions that I am trying to
>  call in my program, doesn't see them in the .a's?  Here is the "cc" line I
>  am using:
> 
> cc -o mysql_test mysql_test.c -L/u/april/mysql -llibmysqlclient
>          (-L/u/april/mysql contains all the library headers and .a files
>  from mysql for test purposes)
> 
>  What am I doing wrong?
> 
>           3)  Are these libraries compiled using a C or C++ compiler?
> ----------------------------------------------------------------------------
> ----------------------------
> >It is generally a bad idea to use many different compilers on the
> >libraries and binaries that are going to be linked together, although
> >this is definitely possible.
> >
> >Maybe cc -o mysql_test mysql_test.c -L/u/april/mysql -llibmysqlclient
> >-static
> >will work. What we are up against is the SCO C compiler/linker which is
> >a weird cookie. If you have to use SCO, I would recommend replacing all
> >of your binary utilities (linker, compiler, assembler) with the ones
> >from GNU. If you can live without SCO, for things like MySQL I would
> >recommend Linux - MySQL is originally developed and tested on Linux,
> >then ported to other platforms. Plus, Linux is much better supported
> >that SCO - one example: if you have a problem with Linux, most of the
> >time guys like myself can quite easily replicate it at home or in the
> >office, or at least tell you exactly what commands you need to run to
> >provide enough info about your system to be able to know what is wrong
> >and how to fix it. Not too many people get to play around with SCO
> >enough to know it very well (not something I would have on my desktop,
> >exactly), or even have access to a SCO system.
> >
> >--
> >Sasha Pachev
> >http://www.sashanet.com/ (home)
> >http://www.direct1.com/ (work)
> >
> 
> ---------------------------------------------------------------------
> Please check "http://www.mysql.com/Manual_chapter/manual_toc.html" before
> posting. To request this thread, e-mail mysql-thread6872@stripped
> 
> To unsubscribe, send a message to the address shown in the
> List-Unsubscribe header of this message. If you cannot see it,
> e-mail mysql-unsubscribe@stripped instead.
Thread
Fw: ./configure problems during 3.21.33b installApril Escamilla9 Jul
  • Re: Fw: ./configure problems during 3.21.33b installGerald Clark9 Jul