Details
-
Bug
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Not a Bug
-
None
-
None
-
None
-
Ubuntu 18.04
Description
I have the most recent package:
sudo apt install mariadb-server
Reading package lists... Done
Building dependency tree
Reading state information... Done
mariadb-server is already the newest version (1:10.1.43-0ubuntu0.18.04.1).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
The following program:
#include <iostream>
#include <mysql.h>
int main(int argc, char *argv[])
when compiled with
g++ -I/usr/include/mariadb -I/usr/include/mariadb/mysql -L/usr/lib/x86_64-linux-gnu/ -lmariadb -lz -ldl -lm -lpthread my.cpp
gives the error:
/tmp/cchC9TlH.o: In function `main':
my.cpp.text+0x15): undefined reference to `mysql_init'
my.cpp.text+0x25): undefined reference to `mysql_close'
collect2: error: ld returned 1 exit status