Comments (8)
Update :
If found a way to build by add theses lines into the CMakeList.txt :
INCLUDE_DIRECTORIES( ${Boost_INCLUDE_DIR} )
FIND_PACKAGE(Boost 1.69 COMPONENTS system random thread REQUIRED)
Is this an issue ?
from sqlpp11-connector-mysql.
Thanks for posting both, issue and solution :-)
Can you prepare a pull request?
from sqlpp11-connector-mysql.
Hello, I dont think, I understand nothing about Cmake :D I think it need a better review to understand the problem.
Other question, how do you link the lib into your executable ?
I tried to add this line into my CMakeLists.txt :
FIND_PACKAGE(sqlpp11 REQUIRED)
target_link_libraries(${TARGET} PUBLIC sqlpp11)
On macOS, I got this error :
[build] Undefined symbols for architecture x86_64:
[build] "sqlpp::mysql::connection::connection(std::__1::shared_ptrsqlpp::mysql::connection_config const&)", referenced from:
[build] Mysql::Connect() in libBSql.a(Mysql.cc.o)
[build] "sqlpp::mysql::connection::~connection()", referenced from:
[build] Mysql::Connect() in libBSql.a(Mysql.cc.o)
[build] ld: symbol(s) not found for architecture x86_64
And on linux ubuntu :
CMake Error at src/mysql/CMakeLists.txt:22 (FIND_PACKAGE):
By not providing "Findsqlpp11.cmake" in CMAKE_MODULE_PATH this project has
asked CMake to find a package configuration file provided by "sqlpp11", but
CMake did not find one.
Could not find a package configuration file provided by "sqlpp11" with any
of the following names:
sqlpp11Config.cmake
sqlpp11-config.cmake
Add the installation prefix of "sqlpp11" to CMAKE_PREFIX_PATH or set
"sqlpp11_DIR" to a directory containing one of the above files. If
"sqlpp11" provides a separate development package or SDK, be sure it has
been installed.
from sqlpp11-connector-mysql.
Not being a CMake master myself, and not having a Mac at hand, this is going to take some time, I am afraid :-)
But first off: In order to link the mysql connector into your program, you need to link the connector library. This is done for the sqlpp11-connector-mysql/tests, for instance.
from sqlpp11-connector-mysql.
Hello @z4qx, I made a PR (#58) that would remove the reliance on Boost.Thread on macOS because nowadays this isn't necessary anymore.
from sqlpp11-connector-mysql.
-- Using /Library/Developer/CommandLineTools/usr/bin/c++ (compiler id: AppleClang)
CMake Error at src/CMakeLists.txt:15 (find_package):
By not providing "Finddate.cmake" in CMAKE_MODULE_PATH this project has
asked CMake to find a package configuration file provided by "date", but
CMake did not find one.
Could not find a package configuration file provided by "date" with any of
the following names:
dateConfig.cmake
date-config.cmake
Add the installation prefix of "date" to CMAKE_PREFIX_PATH or set
"date_DIR" to a directory containing one of the above files. If "date"
provides a separate development package or SDK, be sure it has been
installed.
-- Configuring incomplete, errors occurred!
See also "/Users/admin/Documents/study/workspace/trade-test/third_party/sqlpp11-connector-mysql/build/CMakeFiles/CMakeOutput.log".
from sqlpp11-connector-mysql.
Maybe @kovdan01 can help with that last item?
from sqlpp11-connector-mysql.
@xtuyaowu Hello. Looks like that you do not have date library by Howard Hinnant installed – see requirements section in readme.
It is installed with sqlpp11 by default (if you do not use option USE_SYSTEM_DATE
), so highly likely that you don't have sqlpp11 installed too.
I can build the library on macOS using these commands:
git clone https://github.com/rbock/sqlpp11-connector-mysql.git
cmake -S . -B build -D CMAKE_INSTALL_PREFIX=`pwd`/prefix -D CMAKE_PREFIX_PATH=/path/to/sqlpp11/prefix/
cmake --build . --target install
If you have sqlpp11 installed but are still unable to build the connector, please provide:
- cmake command that you use
- path to sqlpp11 installation prefix (directory where
lib/cmake/Sqlpp11/Sqlpp11Config.cmake
andlib/cmake/date/dateConfig.cmake
are located)
from sqlpp11-connector-mysql.
Related Issues (20)
- Data is truncated with MariaDB Connector/C 3.0.1+ HOT 11
- Selecting a datetime field always returns epoch HOT 2
- Microseconds ignored when selecting datetime column HOT 1
- Crash of queries due to MYSQL_RES that is NULL HOT 7
- mysql replace into command HOT 5
- how to use unhex function ,could you give some info? HOT 1
- database name not used HOT 2
- sample code does not work on windows HOT 1
- Can't build DLL on windows HOT 2
- {char,bind}_result_t.size() is unimplemented HOT 5
- How to create mysql::connection without config HOT 2
- TLS/SSL connection is unsupported HOT 1
- Does sqlpp11 support a connection pool? What do I need to do? HOT 2
- How to return mysql auto incorrect when inserting a record in the table? HOT 2
- how can I set mysql options HOT 1
- Error reported while installing sqlpp11-mysql HOT 4
- Why is it necessary to pass database parameter when creating a connection? HOT 3
- Error when compiling HOT 5
- build failed on linux HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from sqlpp11-connector-mysql.