Hi dear support team,
I want to write some src code and include MariaDB libraries.
I added the the following Buildflags
; Debug Flag Serial or Serial1
build_flags =
-Wall
-Wextra
; -Werror
-DDEBUG_ESP_PORT=Serial1
-I /usr/include/mariadb
-L/usr/lib/x86_64-linux-gnu/
-lmariadb
Compile works fine but the Linker throws an error like:
Linking .pio/build/esp01_1m/firmware.elf
/home/frank/.platformio/packages/toolchain-xtensa/bin/…/lib/gcc/xtensa-lx106-elf/10.3.0/…/…/…/…/xtensa-lx106-elf/bin/ld: /usr/lib/x86_64-linux-gnu/libmariadb.a: error adding symbols: file format not recognized
collect2: error: ld returned 1 exit status
*** [.pio/build/esp01_1m/firmware.elf] Error 1
Does anyone had in the past the same issue?
Or did anyone tried also to add the mariaDB Libs for the esp8266?
On the raspberry it works fine.
The mariadb_config gives:
mariadb_config
Copyright 2011-2020 MariaDB Corporation AB
Get compiler flags for using the MariaDB Connector/C.
Usage: mariadb_config [OPTIONS]
Compiler: GNU 11.3.0
–cflags [-I/usr/include/mariadb -I/usr/include/mariadb/mysql]
–include [-I/usr/include/mariadb -I/usr/include/mariadb/mysql]
–libs [-L/usr/lib/x86_64-linux-gnu/ -lmariadb]
–libs_r [-L/usr/lib/x86_64-linux-gnu/ -lmariadb]
–libs_sys [-ldl -lm -lssl -lcrypto]
–version [10.6.12]
–cc_version [3.3.4]
–socket [/run/mysqld/mysqld.sock]
–port [3306]
–plugindir [/usr/lib/x86_64-linux-gnu/libmariadb3/plugin]
–tlsinfo [OpenSSL 3.0.2]
–variable=VAR VAR is one of:
pkgincludedir [/usr/include/mariadb]
pkglibdir [/usr/lib/x86_64-linux-gnu]
pkgplugindir [/usr/lib/x86_64-linux-gnu/libmariadb3/plugin]
–libmysqld-libs [-L/usr/lib/x86_64-linux-gnu/ -lmariadbd -ldl -lm -lssl -lcrypto]