Hallo!
habe ein problem mit dem mysql libs
Zitat: |
root@intern:/home/erti/c#/testmysqlcon# gcc -I/usr/include/mysql -o mysqltest main.c
/tmp/ccdEYkWu.o: In function `main':
main.c.text+0x10): undefined reference to `mysql_get_client_info'
collect2: error: ld returned 1 exit status
|
Quelltext
1: 2: 3: 4: 5: 6: 7: 8:
| #include <stdio.h> #include <my_global.h> #include <mysql.h>
int main(int argc, char **argv) { printf("MySQL client version: %s\n", mysql_get_client_info()); } |
Zitat: |
Versionen
root@intern:/home/erti/c#/testmysqlcon# ld --version
GNU ld (GNU Binutils for Debian) 2.22
Copyright 2011 Free Software Foundation, Inc.
This program is free software; you may redistribute it under the terms of
the GNU General Public License version 3 or (at your option) a later version.
This program has absolutely no warranty.
root@intern:/home/erti/c#/testmysqlcon# gcc --version
gcc (Debian 4.7.2-5) 4.7.2
Copyright (C) 2012 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
root@intern:/home/erti/c#/testmysqlcon# mysql_config --libs
-L/usr/lib/x86_64-linux-gnu -lmysqlclient -lpthread -lz -lm -lrt -ldl
|
werd da leider nicht schlau draus, wäre Super wenn Ihr mir weiterhelfen könntet!
LG.Patrick
Moderiert von Th69: Code-Tags hinzugefügt
Moderiert von Th69: Quote-Tags hinzugefügt.