Quantcast
Channel: MySQL Forums - Connector/C++
Viewing all articles
Browse latest Browse all 527

xdevapi.h can't pass compile (no replies)

$
0
0
Today,i find my code can't pass compile,and my computer environment is mingw64(It's installed by msys2)+MySQL8.0.15+mysql-connector-c++-8.0.15-winx64.zip.
I copy the 'include' folder to C:\msys64\mingw64\include\mysql.And having the code as follows:
```c++
#include <iostream>
#include <mysql/mysqlx/xdevapi.h>

int msin(){
return 0;
}
```
Howerer,the code can't pass compile.The compile message as follows:
--------------------------------------
[ 50%] Building CXX object CMakeFiles/uhelloworld.dir/main.cpp.obj
[100%] Linking CXX executable uhelloworld.exe
CMakeFiles\uhelloworld.dir/objects.a(main.cpp.obj): In function `mysqlx::string::operator std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >() const':
C:/msys64/mingw64/include/mysql/mysqlx/devapi/common.h:115: undefined reference to `mysqlx::string::Impl::to_utf8[abi:cxx11](mysqlx::string const&)'
CMakeFiles\uhelloworld.dir/objects.a(main.cpp.obj): In function `mysqlx::Value::print(std::ostream&) const':
C:/msys64/mingw64/include/mysql/mysqlx/devapi/document.h:507: undefined reference to `mysqlx::common::Value::print(std::ostream&) const'
CMakeFiles\uhelloworld.dir/objects.a(main.cpp.obj):main.cpp:(.rdata$_ZTCN6mysqlx5ValueE0_NS_6common5ValueE[_ZTCN6mysqlx5ValueE0_NS_6common5ValueE]+0x20): undefined reference to `mysqlx::common::Value::print(std::ostream&) const'
CMakeFiles\uhelloworld.dir/objects.a(main.cpp.obj):main.cpp:(.rdata$.refptr._ZTVN6mysqlx5DbDocE[.refptr._ZTVN6mysqlx5DbDocE]+0x0): undefined reference to `vtable for mysqlx::DbDoc'
collect2.exe: error: ld returned 1 exit status
---------------------------------
I can't solve this problem through www.baidu.com and offical document.
Someone could help me.I'd appreciate with you.

Viewing all articles
Browse latest Browse all 527

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>