Discussion:
[soci-users] VisualStudio 2015/VC 14 support
john
2016-09-16 01:28:52 UTC
Permalink
Does soci-3.2.3 support VC 14? The following command appeared to be
successful:

cmake -DSOCI_STATIC=ON -DWITH_DB2=OFF -DWITH_FIREBIRD=OFF
-DWITH_MYSQL=OFF -DWITH_ORACLE=OFF -DWITH_POSTGRESQL=OFF
-DWITH_SQLITE3=OFF -DSOCI_EMPTY=OFF -DWITH_BOOST=ON -DWITH_ODBC=ON
-DSOCI_ODBC=ON ..

-- Building for: Visual Studio 14 2015
-- The C compiler identification is MSVC 19.0.23026.0
-- The CXX compiler identification is MSVC 19.0.23026.0
-- Check for working C compiler using: Visual Studio 14 2015
-- Check for working C compiler using: Visual Studio 14 2015 -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working CXX compiler using: Visual Studio 14 2015
-- Check for working CXX compiler using: Visual Studio 14 2015 -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Configuring SOCI:
-- SOCI_VERSION = 3.2.3
-- SOCI_ABI_VERSION = 3_2

...

However all builds fail with messages like:

x64\Debug\backend-loader.obj : fatal error LNK1112: module machine type
'x64' conflicts with target machine type 'X86'

I see 14 in the compiler and linker lines:

C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin\CL.exe /c /Zi
/W3 /WX- /Od /Ob0 /Oy- /D WIN32 /D _WINDOWS /D _DEBUG /D
"CMAKE_INTDIR=\"Debug\"" /D _MBCS /Gm- /RTC1 /MDd /GS /fp:precise
/Zc:wchar_t /Zc:forScope /Zc:inline /Fo"cmTC_7a48a.dir\Debug\\"
/Fd"cmTC_7a48a.dir\Debug\vc140.pdb" /Gd /TC /analyze- /errorReport:queue
"C:\Program Files (x86)\CMake\share\cmake-3.4\Modules\CMakeCCompilerABI.c"

C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin\link.exe
/ERRORREPORT:QUEUE
/OUT:"D:\devsrc\soci-3.2.3\build_64\CMakeFiles\CMakeTmp\Debug\cmTC_7a48a.exe"
/INCREMENTAL /NOLOGO kernel32.lib user32.lib gdi32.lib winspool.lib
shell32.lib ole32.lib oleaut32.lib uuid.lib comdlg32.lib advapi32.lib
/MANIFEST /MANIFESTUAC:"level='asInvoker' uiAccess='false'"
/manifest:embed /Debug
/PDB:"D:/devsrc/soci-3.2.3/build_64/CMakeFiles/CMakeTmp/Debug/cmTC_7a48a.pdb"
/SUBSYSTEM:CONSOLE /TLBID:1 /DYNAMICBASE /NXCOMPAT
/IMPLIB:"D:/devsrc/soci-3.2.3/build_64/CMakeFiles/CMakeTmp/Debug/cmTC_7a48a.lib"
/MACHINE:X86 /SAFESEH /machine:X86 /debug
cmTC_7a48a.dir\Debug\CMakeCCompilerABI.obj

I see /MACHINE:X86 in the link line above. Do I need to edit some SOCI
config files or does SOCI already support VC 14?

Thanks,
john


------------------------------------------------------------------------------
Loading...