I build and test SOCI 3.2 on Windows 10 with Visual Studio 2015, using this batch:
SET PREFIX=..\soci-3.2.3-install
SET POSTGRES_DIR=E:\PostgreSQL\9.5
cmake^
-G "NMake Makefiles"^
-DCMAKE_BUILD_TYPE=Release^
-DCMAKE_INSTALL_PREFIX=%PREFIX%^
-DSOCI_TESTS=ON^
-DWITH_ODBC=OFF^
-DWITH_POSTGRESQL=ON^
-DPOSTGRESQL_INCLUDE_DIR="%POSTGRES_DIR%\include"^
-DPOSTGRESQL_LIBRARIES="%POSTGRES_DIR%\lib\libpq.lib"^
-DSOCI_POSTGRESQL_TEST_CONNSTR="host=localhost port=5432 dbname=postgres user=eagui"^
..\soci-3.2.3
nmake
nmake test
I also comment line 27 in soci-3.2.3\core\soci-platform.h
before build, in order to avoid a macro redefinition error caused by one the VC headers. I make sure E:\PostgreSQL\9.5\bin
is added to PATH
. The command prompt has admin privileges.
After running the batch, I get the following output from the test:
...
3/4 Test #3: soci_postgresql_test .............***Failed 1.37 sec
Start 4: soci_postgresql_test_static
4/4 Test #4: soci_postgresql_test_static ......***Failed 0.17 sec
50% tests passed, 2 tests failed out of 4
Total Test time (real) = 1.63 sec
The following tests FAILED:
3 - soci_postgresql_test (Failed)
4 - soci_postgresql_test_static (Failed)
Errors while running CTest
NMAKE : fatal error U1077: 'echo' : return code '0x8'
Stop.
I have configured the PostgreSQL server to accept trust connections. The postgres
database and eagui
user exist in the server.
Any idea why tests do not pass for PostgreSQL and how to fix it?