Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Problem with cygwin-gcc: Linking with libmysqlclient

Status
Not open for further replies.

sachink

Technical User
Jan 2, 2003
2
IN
Hi,

I am unable to do the compiling C file It bombs out somewhere later
possibly when including header files & libraries.

It bombs out with the following :-

$ gcc qq.c
/cygdrive/c/WINDOWS/TEMP/ccbLfUoU.o(.text+0x68):qq.c: undefined
reference to `_m
ysql_init'
/cygdrive/c/WINDOWS/TEMP/ccbLfUoU.o(.text+0x93):qq.c: undefined
reference to `_g
etch'
/cygdrive/c/WINDOWS/TEMP/ccbLfUoU.o(.text+0xe4):qq.c: undefined
reference to `_m
ysql_real_connect'
/cygdrive/c/WINDOWS/TEMP/ccbLfUoU.o(.text+0xf5):qq.c: undefined
reference to `_m
ysql_error'
/cygdrive/c/WINDOWS/TEMP/ccbLfUoU.o(.text+0x118):qq.c: undefined
reference to `_
getch'
/cygdrive/c/WINDOWS/TEMP/ccbLfUoU.o(.text+0x131):qq.c: undefined
reference to `_
mysql_close'
collect2: ld returned 1 exit status

Have I configured it correctly or is it broken ?
sometimes it also gives errors when linking the object 'o' file with libmysqlclient library file::
->file mot found
->undefined refernce to libmysqlclient
i have even tried -lm option , -lmysqlclient option

Any help will be gratefully accepted

SACHIN KHANNA
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top