Discussion:
[soci-users] Build Warning for Postgresql-9.2 backend
asif saeed
2013-07-19 05:25:18 UTC
Permalink
Hi,

I just built soci-3.2.1 for Windows on Windows 7 32-bit with Visual Studio
2012 for Oracle, Sqlite3.7.17 and Postgresql-9.2.4-1. However, I get the
following warnings several times at the end:

WARNING: Target "soci_postgresql" requests linking to directory
"E:/postgresql-9.2/lib". Targets may link only to libraries. CMake is
dropping the item.
WARNING: Target "soci_postgresql_test" requests linking to directory
"E:/postgresql-9.2/lib". Targets may link only to libraries. CMake is
dropping the item.
WARNING: Target "soci_postgresql_test_static" requests linking to directory
"E:/postgresql-9.2/lib". Targets may link only to libraries. CMake is
dropping the item.

Here is my command-line:

cmake -G "Visual Studio 11" -DSOCI_STATIC=ON -DWITH_BOOST=ON
-DBOOST_RELEASE_VERSION=1.54 -DBOOST_INCLUDE_DIR=E:\libs\boost_1_54_0\boost
-DBOOST_LIBRARIES=E:\libs\boost_1_54_0\stage\lib -DWITH_ORACLE=ON
-DORACLE_INCLUDE_DIR=E:\Oracle\product\10.1.0\Client_1\oci\include
-DORACLE_LIBRARIES=E:\Oracle\product\10.1.0\Client_1\oci\lib\msvc
-DORACLE_TEST_CONNSTR:STRING="service=devdb user=ultradba password=ultra"
..\soci-3.2.1-source -DWITH_POSTGRESQL=ON -DPOSTGRESQL_VERSION=9.2.4-1
-DPOSTGRESQL_INCLUDE_DIR=E:\postgresql-9.2\include
-DPOSTGRESQL_LIBRARIES=E:\postgresql-9.2\lib -DSOCI_POSTGRESQL=ON
-DSOCI_POSTGRESQL_TEST_CONNSTR:STRING="dbname=postgres user=postgres"
-DWITH_SQLITE3=ON -DSQLITE3_INCLUDE_DIR=E:\libs\sqlite\include
-DSQLITE3_LIBRARIES=E:\libs\sqlite\lib -DSOCI_SQLITE3=ON

What have I done wrong?

Best regards,
-Asif
Mateusz Loskot
2013-07-19 08:39:56 UTC
Permalink
Post by asif saeed
cmake -G "Visual Studio 11" -DSOCI_STATIC=ON -DWITH_BOOST=ON
-DBOOST_RELEASE_VERSION=1.54 -DBOOST_INCLUDE_DIR=E:\libs\boost_1_54_0\boost
-DBOOST_LIBRARIES=E:\libs\boost_1_54_0\stage\lib -DWITH_ORACLE=ON
-DORACLE_INCLUDE_DIR=E:\Oracle\product\10.1.0\Client_1\oci\include
-DORACLE_LIBRARIES=E:\Oracle\product\10.1.0\Client_1\oci\lib\msvc
-DORACLE_TEST_CONNSTR:STRING="service=devdb user=ultradba password=ultra"
..\soci-3.2.1-source
The source path should be the last argument in the command line.
Post by asif saeed
-DWITH_POSTGRESQL=ON -DPOSTGRESQL_VERSION=9.2.4-1
No need to specify version, this is determined by CMake.
Post by asif saeed
-DPOSTGRESQL_INCLUDE_DIR=E:\postgresql-9.2\include
-DPOSTGRESQL_LIBRARIES=E:\postgresql-9.2\lib
By convention, CMake *_LIBRARIES options take path (or ; separated
list of paths)
to library (or libraries) files, not folder path(s).

-DPOSTGRESQL_LIBRARIES=E:\postgresql-9.2\lib\libpq.lib

"Full paths to libraries to link SOCI against to enable the backend support"
http://soci.sourceforge.net/doc/3.2/installation.html

If this wording is unclear, please suggest improvement.

Best regards,
--
Mateusz Loskot, http://mateusz.loskot.net
asif saeed
2013-07-19 10:21:05 UTC
Permalink
Hi Mateusz,

Thank you very much! That did the job! :)

Thanks & best regards,
-Asif
Post by asif saeed
Post by asif saeed
cmake -G "Visual Studio 11" -DSOCI_STATIC=ON -DWITH_BOOST=ON
-DBOOST_RELEASE_VERSION=1.54
-DBOOST_INCLUDE_DIR=E:\libs\boost_1_54_0\boost
............
The source path should be the last argument in the command line.
Post by asif saeed
-DWITH_POSTGRESQL=ON -DPOSTGRESQL_VERSION=9.2.4-1
No need to specify version, this is determined by CMake.
Post by asif saeed
-DPOSTGRESQL_INCLUDE_DIR=E:\postgresql-9.2\include
-DPOSTGRESQL_LIBRARIES=E:\postgresql-9.2\lib
By convention, CMake *_LIBRARIES options take path (or ; separated
list of paths)
to library (or libraries) files, not folder path(s).
-DPOSTGRESQL_LIBRARIES=E:\postgresql-9.2\lib\libpq.lib
"Full paths to libraries to link SOCI against to enable the backend support"
http://soci.sourceforge.net/doc/3.2/installation.html
asif saeed
2013-07-19 10:31:44 UTC
Permalink
Hi Mateusz,
Post by Mateusz Loskot
By convention, CMake *_LIBRARIES options take path (or ; separated
list of paths)
to library (or libraries) files, not folder path(s).
-DPOSTGRESQL_LIBRARIES=
E:\
postgresql-9.2\lib\libpq.lib
"Full paths to libraries to link SOCI against to enable the backend support"
http://soci.sourceforge.net/doc/3.2/installation.html
If this wording is unclear, please suggest improvement.
I am sorry I just took at cursory look at the text - the text is very
clear. However, it would be helpful if an example (e.g. E:\
postgresql-9.2\lib\libpq.lib; E:\postgresql-9.2\lib\libpq.lib2, and
so on) were included in this text as well. I just ran a quick eye over the
text and ***presumed*** that it meant "library directory" - which was, of
course, wrong.

Thanks & best regards,
-Asif

Loading...