List:General Discussion« Previous MessageNext Message »
From:Paul DuBois Date:July 6 1999 4:58pm
Subject:Re: Undefined reference to ...
View as plain text  
At 2:52 PM +0300 7/6/99, Tõnu Samuel wrote:
>Jacek Skowyra wrote:
>
>> I'm new on this list and I'm new on Linux, so I have a question like this:
>> when I try to compile my program
>> gcc -I/path/to/mysql.h programm_name.c
>> in which I'm using mysql functions, in
>> return I get :
>> Undefined references to ...
>> I get full screen of that signs concernig all lines where I use mysql
>> functions.
>
>Compiling consists from different stages:
>
>Preprocessing, compiling and then linking
>
>If you getting errors about missing symbols, there is problem with
>linking. You must include also paths and names for libraries you want to
>link:
>
>gcc -I/path/to/mysql.h programm_name.c -L /path/to/libmysqlclient.a
>-lmysqlclient

Well, actually, those paths must be paths to the directories containing
mysql.h and libmysqlclient.a, not the paths to mysql.h and libmysqlclient.a.

-- 
Paul DuBois, paul@stripped
Northern League Chronicles: http://www.snake.net/nl/
Thread
Store whole record in one field of another table?Robin Bowes6 Jul
  • Re: Store whole record in one field of another table?Erik Liljencrantz6 Jul
  • Re: Store whole record in one field of another table?Robin Bowes6 Jul
    • Undefined reference to ...Jacek Skowyra6 Jul
      • Re: Undefined reference to ...Tõnu Samuel6 Jul
        • Re: Undefined reference to ...Paul DuBois6 Jul
      • Re: Undefined reference to ...Tõnu Samuel7 Jul