MySQL Forums
Forum List  »  Connector/C++

mixing mingw64 gcc and prebuilt vs14 2.0.3 library
Posted by: Xunlei Wu
Date: December 11, 2016 05:10AM

I try to compile the example given by

using ming64 6.2.0 on windows10 64bit machine. I use the prebuilt vs14 2.0.3 library. None of the connector API implementations can be found whether I use static or dynamic mysqlcppconn2. Do I have to build the connector from source using mingw64 gcc/g++ before I can use it? Any missing steps? Thank you very much.

g++.exe -w -std=c++11 -m64 -g -fexceptions -I"C:\Program Files\MySQL\mysql-connector-c++-2.0.3-windows-x86-64bit\include" -c C:\Users\lampa\Documents\RFID\readRFID\main.cpp -o obj\Debug\main.o
g++.exe -L"C:\Program Files\MySQL\mysql-connector-c++-2.0.3-windows-x86-64bit\lib64\vs14" -o bin\Debug\readRFID.exe obj\Debug\main.o -m64 -lmysqlcppconn2 -lpthread
obj\Debug\main.o: In function `main':
C:/Users/lampa/Documents/RFID/readRFID/main.cpp:43: undefined reference to `mysqlx::internal::XSession_base::getSchema(mysqlx::string const&, bool)'
C:/Users/lampa/Documents/RFID/readRFID/main.cpp:44: undefined reference to `mysqlx::Schema::createCollection(mysqlx::string const&, bool)'
C:/Users/lampa/Documents/RFID/readRFID/main.cpp:50: undefined reference to `mysqlx::Result::getDocumentId() const'

Options: ReplyQuote

Written By
mixing mingw64 gcc and prebuilt vs14 2.0.3 library
December 11, 2016 05:10AM

Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.