PDA

View Full Version : Linking?



santabruzer
15th September 2004, 12:31 AM
I am not sure if there was a problem with this before, but i can't compile a simple mysql code written in C.


Building file: gsscansql.c ...
gcc "gsscansql.c" -o "gsscansql"
/tmp/ccOHlkGO.o(.text+0x764): In function `main':
: undefined reference to `mysql_init'
/tmp/ccOHlkGO.o(.text+0x7b3): In function `main':
: undefined reference to `mysql_real_connect'
/tmp/ccOHlkGO.o(.text+0x7ca): In function `main':
: undefined reference to `mysql_error'
/tmp/ccOHlkGO.o(.text+0xbf5): In function `main':
: undefined reference to `mysql_close'
/tmp/ccOHlkGO.o(.text+0xe07): In function `show_info':
: undefined reference to `mysql_real_query'
/tmp/ccOHlkGO.o(.text+0xe27): In function `show_info':
: undefined reference to `mysql_error'
collect2: ld returned 1 exit status
Completed ... unsuccessful
Total time taken: 1 secs

I get those Errors. Now because of the vote i starting using Anjuta.... well i keep getting this errors.

mysql is installed.. because i installed everything.. i have mysql.h pointing to the right location, and it can compile but not build. it's pretty weird. I am not sure what to do next... or did anyone have a simular question.

Please if this was answered already (couldn't find it), could you direct me to the post...