libpqxx: build fails on VS2015

as of 3f386376774b19e22e9b84403601c2df48f3b2b0 on Windows 8.1 Pro 64-bit with Visual Studio 2015

I wonder if this is related https://stackoverflow.com/questions/23374003/symbol-cannot-be-used-in-a-using-declaration

build works correctly on svn trunk rev 1945

here is my terminal output:

C:\src>git clone https://github.com/jtv/libpqxx
C:\src>cd libpqxx
C:\src\libpqxx>nmake /f win32\vc-libpqxx.mak ALL

Microsoft (R) Program Maintenance Utility Version 14.00.24210.0
Copyright (C) Microsoft Corporation.  All rights reserved.

        cl.exe /nologo /W3 /EHsc /FD /GR /c  /I "include" /I C:\PROGRA~1\POSTGR~1\9.5\include /I C:\PROGRA~1\POSTGR~1\9.5\include  /D "WIN32" /D "_MBCS" /D "_WINDOWS" /D "PQXX_INTERNAL" /MDd /Gm /ZI /Od /D "_LIB" /D "_DEBUG" /RTC1 /Fo"ObjStaticDebug\\" /Fd"ObjStaticDebug\\" src/binarystring.cxx binarystring.cxx
c:\src\libpqxx\include\pqxx\result.hxx(222): warning C4800: 'const pqxx::internal::pq::PGresult *': forcing value to bool 'true' or 'false' (performance warning)
c:\src\libpqxx\include\pqxx\row.hxx(292): error C2886: 'field': symbol cannot be used in a member using-declaration
c:\src\libpqxx\include\pqxx\row.hxx(209): note: see declaration of 'field'
c:\src\libpqxx\include\pqxx\row.hxx(293): error C2886: 'field': symbol cannot be used in a member using-declaration
c:\src\libpqxx\include\pqxx\row.hxx(209): note: see declaration of 'field'
c:\src\libpqxx\include\pqxx\result_iterator.hxx(134): error C2886: 'row': symbol cannot be used in a member using-declaration
c:\src\libpqxx\include\pqxx\result_iterator.hxx(42): note: see declaration of 'row'
c:\src\libpqxx\include\pqxx\result_iterator.hxx(135): error C2886: 'row': symbol cannot be used in a member using-declaration
c:\src\libpqxx\include\pqxx\result_iterator.hxx(42): note: see declaration of 'row'
c:\src\libpqxx\src\binarystring.cxx(57): error C2653: 'internal': is not a class or namespace name
c:\src\libpqxx\src\binarystring.cxx(57): error C2062: type 'unsigned char' unexpected
c:\src\libpqxx\src\binarystring.cxx(58): error C2065: 'A': undeclared identifier
c:\src\libpqxx\src\binarystring.cxx(58): error C2228: left of '.get' must have class/struct/union
c:\src\libpqxx\src\binarystring.cxx(58): note: type is 'unknown-type'
NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\amd64\cl.exe"' : return code '0x2'
Stop.

MSDN: Compiler Error C2228 Compiler Error C2886

About this issue

  • Original URL
  • State: closed
  • Created 7 years ago
  • Comments: 16 (13 by maintainers)

Most upvoted comments

@pembeci

svn co svn://pqxx.org/libpqxx/trunk

revision 1945 just happens to be the latest revision of trunk (basically the same idea as a git commit sha hash)

you can find the link through the website http://pqxx.org/development/libpqxx/wiki/DownloadPage