Details
-
Bug
-
Status: Closed (View Workflow)
-
Blocker
-
Resolution: Not a Bug
-
3.0.4
-
None
-
ubuntu linux
Description
how to compile and link the connector.
i have compiled and sudo make install successfully.
I get a reference error
SOURCE: main.cpp
#include <mysql.h>
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
int main(int argc, char *argv[])
{ MYSQL *mysql; const char *query; MYSQL_RES *result; mysql= mysql_init(NULL); }COMPILE:
gcc main.cpp -o main -I/usr/local/include/mariadb
-L/usr/local/lib/mariadb/libmariadb -L/usr/local/lib/mariadb/libmariadbclient
/tmp/cczVzenH.o: In function `main':
main.cpp.text+0x15): undefined reference to `mysql_init'
collect2: error: ld returned 1 exit status
Attachments
Issue Links
- blocks
-
CONC-23 Undefined references while trying to compile primitive program with mysql_init
- Open