Discussion:
[soci-users] Using SOCI with Boost and SQLite
JP
2013-03-30 14:17:19 UTC
Permalink
Hi all,

first off I'd like to thank you for making possible this great library!

I'm trying to compile the library in Windows XP, with Visual Studio
2008, using Boost and SQLite, but I don't know how to launch CMake for
finding these libraries. This is what I use:

cmake -G "Visual Studio 9 2008" ^
-DWITH_DB2=OFF -DWITH_FIREBIRD=OFF -DWITH_MYSQL=OFF ^
-DWITH_ODBC=OFF -DWITH_ORACLE=OFF -DWITH_POSTGRESQL=OFF ^
-DWITH_BOOST=ON -DWITH_SQLITE3=ON ^
-DBOOST_RELEASE_VERSION=1.53.0 ^
-DBOOST_INCLUDE_DIR=../../boost/boost ^
-DBOOST_LIBRARIES=../../boost/bin.V2/libs ^
-DSQLITE3_INCLUDE_DIR=../../sqlite3/sqlite3 ^
-DSQLITE3_LIBRARIES=../../sqlite3/Debug ^
..

I'm pretty sure that in the directories I've specified for Boost and
SQLite the libraries can be found. I've also tried to put the absolute
paths, but the results of CMake always say that neither Boost or
SQLite are found! Any suggestion please? Which files do the CMake
check in order to confirm that the Boost and SQLite libraries are
found?

Thanks!
JP
Ricardo Fabiano de Andrade
2013-03-30 14:25:27 UTC
Permalink
Put a -DBOOST_ROOT pointing to the boost directory (you don't need others
for boost). This may help you with it.
SQLite is another history, I don't remember for sure what I used. :)

Cheers,
Ricardo Andrade
Post by JP
Hi all,
first off I'd like to thank you for making possible this great library!
I'm trying to compile the library in Windows XP, with Visual Studio
2008, using Boost and SQLite, but I don't know how to launch CMake for
cmake -G "Visual Studio 9 2008" ^
-DWITH_DB2=OFF -DWITH_FIREBIRD=OFF -DWITH_MYSQL=OFF ^
-DWITH_ODBC=OFF -DWITH_ORACLE=OFF -DWITH_POSTGRESQL=OFF ^
-DWITH_BOOST=ON -DWITH_SQLITE3=ON ^
-DBOOST_RELEASE_VERSION=1.53.0 ^
-DBOOST_INCLUDE_DIR=../../boost/boost ^
-DBOOST_LIBRARIES=../../boost/bin.V2/libs ^
-DSQLITE3_INCLUDE_DIR=../../sqlite3/sqlite3 ^
-DSQLITE3_LIBRARIES=../../sqlite3/Debug ^
..
I'm pretty sure that in the directories I've specified for Boost and
SQLite the libraries can be found. I've also tried to put the absolute
paths, but the results of CMake always say that neither Boost or
SQLite are found! Any suggestion please? Which files do the CMake
check in order to confirm that the Boost and SQLite libraries are
found?
Thanks!
JP
------------------------------------------------------------------------------
Own the Future-Intel(R) Level Up Game Demo Contest 2013
Rise to greatness in Intel's independent game demo contest. Compete
for recognition, cash, and the chance to get your game on Steam.
$5K grand prize plus 10 genre and skill prizes. Submit your demo
by 6/6/13. http://altfarm.mediaplex.com/ad/ck/12124-176961-30367-2
_______________________________________________
soci-users mailing list
https://lists.sourceforge.net/lists/listinfo/soci-users
JP
2013-03-30 14:37:52 UTC
Permalink
Yeah, I works fine now for Boost! Thanks Ricardo! I you get to
remember how to fix the SQLite issue, please let me know. Maybe
something like SQLITE3_ROOT??
Post by Ricardo Fabiano de Andrade
Put a -DBOOST_ROOT pointing to the boost directory (you don't need others
for boost). This may help you with it.
SQLite is another history, I don't remember for sure what I used. :)
Cheers,
Ricardo Andrade
Post by JP
Hi all,
first off I'd like to thank you for making possible this great library!
I'm trying to compile the library in Windows XP, with Visual Studio
2008, using Boost and SQLite, but I don't know how to launch CMake for
cmake -G "Visual Studio 9 2008" ^
-DWITH_DB2=OFF -DWITH_FIREBIRD=OFF -DWITH_MYSQL=OFF ^
-DWITH_ODBC=OFF -DWITH_ORACLE=OFF -DWITH_POSTGRESQL=OFF ^
-DWITH_BOOST=ON -DWITH_SQLITE3=ON ^
-DBOOST_RELEASE_VERSION=1.53.0 ^
-DBOOST_INCLUDE_DIR=../../boost/boost ^
-DBOOST_LIBRARIES=../../boost/bin.V2/libs ^
-DSQLITE3_INCLUDE_DIR=../../sqlite3/sqlite3 ^
-DSQLITE3_LIBRARIES=../../sqlite3/Debug ^
..
I'm pretty sure that in the directories I've specified for Boost and
SQLite the libraries can be found. I've also tried to put the absolute
paths, but the results of CMake always say that neither Boost or
SQLite are found! Any suggestion please? Which files do the CMake
check in order to confirm that the Boost and SQLite libraries are
found?
Thanks!
JP
------------------------------------------------------------------------------
Own the Future-Intel(R) Level Up Game Demo Contest 2013
Rise to greatness in Intel's independent game demo contest. Compete
for recognition, cash, and the chance to get your game on Steam.
$5K grand prize plus 10 genre and skill prizes. Submit your demo
by 6/6/13. http://altfarm.mediaplex.com/ad/ck/12124-176961-30367-2
_______________________________________________
soci-users mailing list
https://lists.sourceforge.net/lists/listinfo/soci-users
------------------------------------------------------------------------------
Own the Future-Intel(R) Level Up Game Demo Contest 2013
Rise to greatness in Intel's independent game demo contest. Compete
for recognition, cash, and the chance to get your game on Steam.
$5K grand prize plus 10 genre and skill prizes. Submit your demo
by 6/6/13. http://altfarm.mediaplex.com/ad/ck/12124-176961-30367-2
_______________________________________________
soci-users mailing list
https://lists.sourceforge.net/lists/listinfo/soci-users
Alex Ott
2013-03-30 14:43:51 UTC
Permalink
Hi

You can specify additional directories with -DCMAKE_INCLUDE_PATH=/...
and -DCMAKE_LIBRARY_PATH=/...
Post by JP
Yeah, I works fine now for Boost! Thanks Ricardo! I you get to
remember how to fix the SQLite issue, please let me know. Maybe
something like SQLITE3_ROOT??
Post by Ricardo Fabiano de Andrade
Put a -DBOOST_ROOT pointing to the boost directory (you don't need others
for boost). This may help you with it.
SQLite is another history, I don't remember for sure what I used. :)
Cheers,
Ricardo Andrade
Post by JP
Hi all,
first off I'd like to thank you for making possible this great library!
I'm trying to compile the library in Windows XP, with Visual Studio
2008, using Boost and SQLite, but I don't know how to launch CMake for
cmake -G "Visual Studio 9 2008" ^
-DWITH_DB2=OFF -DWITH_FIREBIRD=OFF -DWITH_MYSQL=OFF ^
-DWITH_ODBC=OFF -DWITH_ORACLE=OFF -DWITH_POSTGRESQL=OFF ^
-DWITH_BOOST=ON -DWITH_SQLITE3=ON ^
-DBOOST_RELEASE_VERSION=1.53.0 ^
-DBOOST_INCLUDE_DIR=../../boost/boost ^
-DBOOST_LIBRARIES=../../boost/bin.V2/libs ^
-DSQLITE3_INCLUDE_DIR=../../sqlite3/sqlite3 ^
-DSQLITE3_LIBRARIES=../../sqlite3/Debug ^
..
I'm pretty sure that in the directories I've specified for Boost and
SQLite the libraries can be found. I've also tried to put the absolute
paths, but the results of CMake always say that neither Boost or
SQLite are found! Any suggestion please? Which files do the CMake
check in order to confirm that the Boost and SQLite libraries are
found?
Thanks!
JP
------------------------------------------------------------------------------
Own the Future-Intel(R) Level Up Game Demo Contest 2013
Rise to greatness in Intel's independent game demo contest. Compete
for recognition, cash, and the chance to get your game on Steam.
$5K grand prize plus 10 genre and skill prizes. Submit your demo
by 6/6/13. http://altfarm.mediaplex.com/ad/ck/12124-176961-30367-2
_______________________________________________
soci-users mailing list
https://lists.sourceforge.net/lists/listinfo/soci-users
------------------------------------------------------------------------------
Own the Future-Intel(R) Level Up Game Demo Contest 2013
Rise to greatness in Intel's independent game demo contest. Compete
for recognition, cash, and the chance to get your game on Steam.
$5K grand prize plus 10 genre and skill prizes. Submit your demo
by 6/6/13. http://altfarm.mediaplex.com/ad/ck/12124-176961-30367-2
_______________________________________________
soci-users mailing list
https://lists.sourceforge.net/lists/listinfo/soci-users
------------------------------------------------------------------------------
Own the Future-Intel(R) Level Up Game Demo Contest 2013
Rise to greatness in Intel's independent game demo contest. Compete
for recognition, cash, and the chance to get your game on Steam.
$5K grand prize plus 10 genre and skill prizes. Submit your demo
by 6/6/13. http://altfarm.mediaplex.com/ad/ck/12124-176961-30367-2
_______________________________________________
soci-users mailing list
https://lists.sourceforge.net/lists/listinfo/soci-users
--
With best wishes, Alex Ott
http://alexott.net/
Twitter: alexott_en (English), alexott (Russian)
Skype: alex.ott
Sergei Nikulov
2013-03-30 14:45:49 UTC
Permalink
Yes. -DSQLITE_ROOT_DIR=<path to sqlite3 root> should work.

It will search for sqlite3.h in <SQLITE_ROOT_DIR>/include
And sqlite3.lib in <SQLITE_ROOT_DIR>/lib

Refer to
https://github.com/SOCI/soci/blob/develop/src/cmake/modules/FindSQLite3.cmakefor
more details.
Post by JP
Yeah, I works fine now for Boost! Thanks Ricardo! I you get to
remember how to fix the SQLite issue, please let me know. Maybe
something like SQLITE3_ROOT??
Post by Ricardo Fabiano de Andrade
Put a -DBOOST_ROOT pointing to the boost directory (you don't need others
for boost). This may help you with it.
SQLite is another history, I don't remember for sure what I used. :)
Cheers,
Ricardo Andrade
Post by JP
Hi all,
first off I'd like to thank you for making possible this great library!
I'm trying to compile the library in Windows XP, with Visual Studio
2008, using Boost and SQLite, but I don't know how to launch CMake for
cmake -G "Visual Studio 9 2008" ^
-DWITH_DB2=OFF -DWITH_FIREBIRD=OFF -DWITH_MYSQL=OFF ^
-DWITH_ODBC=OFF -DWITH_ORACLE=OFF -DWITH_POSTGRESQL=OFF ^
-DWITH_BOOST=ON -DWITH_SQLITE3=ON ^
-DBOOST_RELEASE_VERSION=1.53.0 ^
-DBOOST_INCLUDE_DIR=../../boost/boost ^
-DBOOST_LIBRARIES=../../boost/bin.V2/libs ^
-DSQLITE3_INCLUDE_DIR=../../sqlite3/sqlite3 ^
-DSQLITE3_LIBRARIES=../../sqlite3/Debug ^
..
I'm pretty sure that in the directories I've specified for Boost and
SQLite the libraries can be found. I've also tried to put the absolute
paths, but the results of CMake always say that neither Boost or
SQLite are found! Any suggestion please? Which files do the CMake
check in order to confirm that the Boost and SQLite libraries are
found?
Thanks!
JP
------------------------------------------------------------------------------
Post by Ricardo Fabiano de Andrade
Post by JP
Own the Future-Intel(R) Level Up Game Demo Contest 2013
Rise to greatness in Intel's independent game demo contest. Compete
for recognition, cash, and the chance to get your game on Steam.
$5K grand prize plus 10 genre and skill prizes. Submit your demo
by 6/6/13. http://altfarm.mediaplex.com/ad/ck/12124-176961-30367-2
_______________________________________________
soci-users mailing list
https://lists.sourceforge.net/lists/listinfo/soci-users
------------------------------------------------------------------------------
Post by Ricardo Fabiano de Andrade
Own the Future-Intel(R) Level Up Game Demo Contest 2013
Rise to greatness in Intel's independent game demo contest. Compete
for recognition, cash, and the chance to get your game on Steam.
$5K grand prize plus 10 genre and skill prizes. Submit your demo
by 6/6/13. http://altfarm.mediaplex.com/ad/ck/12124-176961-30367-2
_______________________________________________
soci-users mailing list
https://lists.sourceforge.net/lists/listinfo/soci-users
------------------------------------------------------------------------------
Own the Future-Intel(R) Level Up Game Demo Contest 2013
Rise to greatness in Intel's independent game demo contest. Compete
for recognition, cash, and the chance to get your game on Steam.
$5K grand prize plus 10 genre and skill prizes. Submit your demo
by 6/6/13. http://altfarm.mediaplex.com/ad/ck/12124-176961-30367-2
_______________________________________________
soci-users mailing list
https://lists.sourceforge.net/lists/listinfo/soci-users
--
Best Regards,
Sergei Nikulov
JP
2013-03-30 14:55:59 UTC
Permalink
It works! Thanks to all for such awesome fast response!
Post by Sergei Nikulov
Yes. -DSQLITE_ROOT_DIR=<path to sqlite3 root> should work.
It will search for sqlite3.h in <SQLITE_ROOT_DIR>/include
And sqlite3.lib in <SQLITE_ROOT_DIR>/lib
Refer to
https://github.com/SOCI/soci/blob/develop/src/cmake/modules/FindSQLite3.cmake
for more details.
Post by JP
Yeah, I works fine now for Boost! Thanks Ricardo! I you get to
remember how to fix the SQLite issue, please let me know. Maybe
something like SQLITE3_ROOT??
Post by Ricardo Fabiano de Andrade
Put a -DBOOST_ROOT pointing to the boost directory (you don't need others
for boost). This may help you with it.
SQLite is another history, I don't remember for sure what I used. :)
Cheers,
Ricardo Andrade
Post by JP
Hi all,
first off I'd like to thank you for making possible this great library!
I'm trying to compile the library in Windows XP, with Visual Studio
2008, using Boost and SQLite, but I don't know how to launch CMake for
cmake -G "Visual Studio 9 2008" ^
-DWITH_DB2=OFF -DWITH_FIREBIRD=OFF -DWITH_MYSQL=OFF ^
-DWITH_ODBC=OFF -DWITH_ORACLE=OFF -DWITH_POSTGRESQL=OFF ^
-DWITH_BOOST=ON -DWITH_SQLITE3=ON ^
-DBOOST_RELEASE_VERSION=1.53.0 ^
-DBOOST_INCLUDE_DIR=../../boost/boost ^
-DBOOST_LIBRARIES=../../boost/bin.V2/libs ^
-DSQLITE3_INCLUDE_DIR=../../sqlite3/sqlite3 ^
-DSQLITE3_LIBRARIES=../../sqlite3/Debug ^
..
I'm pretty sure that in the directories I've specified for Boost and
SQLite the libraries can be found. I've also tried to put the absolute
paths, but the results of CMake always say that neither Boost or
SQLite are found! Any suggestion please? Which files do the CMake
check in order to confirm that the Boost and SQLite libraries are
found?
Thanks!
JP
------------------------------------------------------------------------------
Own the Future-Intel(R) Level Up Game Demo Contest 2013
Rise to greatness in Intel's independent game demo contest. Compete
for recognition, cash, and the chance to get your game on Steam.
$5K grand prize plus 10 genre and skill prizes. Submit your demo
by 6/6/13. http://altfarm.mediaplex.com/ad/ck/12124-176961-30367-2
_______________________________________________
soci-users mailing list
https://lists.sourceforge.net/lists/listinfo/soci-users
------------------------------------------------------------------------------
Own the Future-Intel(R) Level Up Game Demo Contest 2013
Rise to greatness in Intel's independent game demo contest. Compete
for recognition, cash, and the chance to get your game on Steam.
$5K grand prize plus 10 genre and skill prizes. Submit your demo
by 6/6/13. http://altfarm.mediaplex.com/ad/ck/12124-176961-30367-2
_______________________________________________
soci-users mailing list
https://lists.sourceforge.net/lists/listinfo/soci-users
------------------------------------------------------------------------------
Own the Future-Intel(R) Level Up Game Demo Contest 2013
Rise to greatness in Intel's independent game demo contest. Compete
for recognition, cash, and the chance to get your game on Steam.
$5K grand prize plus 10 genre and skill prizes. Submit your demo
by 6/6/13. http://altfarm.mediaplex.com/ad/ck/12124-176961-30367-2
_______________________________________________
soci-users mailing list
https://lists.sourceforge.net/lists/listinfo/soci-users
--
Best Regards,
Sergei Nikulov
------------------------------------------------------------------------------
Own the Future-Intel(R) Level Up Game Demo Contest 2013
Rise to greatness in Intel's independent game demo contest. Compete
for recognition, cash, and the chance to get your game on Steam.
$5K grand prize plus 10 genre and skill prizes. Submit your demo
by 6/6/13. http://altfarm.mediaplex.com/ad/ck/12124-176961-30367-2
_______________________________________________
soci-users mailing list
https://lists.sourceforge.net/lists/listinfo/soci-users
Mateusz Loskot
2013-03-30 20:53:28 UTC
Permalink
Post by JP
Hi all,
first off I'd like to thank you for making possible this great library!
I'm trying to compile the library in Windows XP, with Visual Studio
2008, using Boost and SQLite, but I don't know how to launch CMake for
cmake -G "Visual Studio 9 2008" ^
-DWITH_DB2=OFF -DWITH_FIREBIRD=OFF -DWITH_MYSQL=OFF ^
-DWITH_ODBC=OFF -DWITH_ORACLE=OFF -DWITH_POSTGRESQL=OFF ^
-DWITH_BOOST=ON -DWITH_SQLITE3=ON ^
-DBOOST_RELEASE_VERSION=1.53.0 ^
-DBOOST_INCLUDE_DIR=../../boost/boost ^
-DBOOST_LIBRARIES=../../boost/bin.V2/libs ^
-DSQLITE3_INCLUDE_DIR=../../sqlite3/sqlite3 ^
-DSQLITE3_LIBRARIES=../../sqlite3/Debug ^
------^^^^^^^^^^^^^


Please, take a look at the "Building SOCI on Windows" thread postd recently,
with this explanation I posted here:

http://sourceforge.net/mailarchive/message.php?msg_id=30648021

Best regards,
--
Mateusz Loskot, http://mateusz.loskot.net

Loading...