John, A SOCI.sln is created by default because you are not specifying any build system with the -G option for cmake. I don't know if SOCI has issues with Visual Studio 2015, it shouldn't. But that is why I suggested you to try building SOCI from the command line with NMake using the "-G "NMake Makefiles" option (without quotes). Follow the steps I gave you and tell me how it goes.
Hope it helps. Erasmo. -----Original Message----- From: john [mailto:j...@dgi.com] Sent: viernes 18 de noviembre de 2016 10:55 a. m. To: soci-users@lists.sourceforge.net Subject: Re: [soci-users] Does SOCI support VisualStudio 2015/VC 14? Thank you very much Erasmo. The thing is that when I set my build environment to use VC 11 and then run cmake a SOCI.sln is created which I can then use to build SOCI. However when I set my build environment to use VC 14 and then run cmake a SOCI.sln is created which is useless. Loading that SOCI.sln gives the attached errors. So does than mean that with VC 14 I have to build SOCI outside of devenv? john On 11/17/2016 6:38 PM, Erasmo Aguilera wrote: > Hello John, > > It seems that you are building SOCI on an x64 machine, but you are using the > x86 compiler of Visual Studio. Maybe you are using a x86 configuration for > the Visual Studio project. To fix it, either change the Visual Studio > configuration to a x64 one or use NMake for the build instead (just as I do > it). > > If you wanna go with NMake, try the following: > > - Open a new command prompt. > - Run "C:\Program Files (x86)\Microsoft Visual Studio > 14.0\VC\bin\amd64\vcvars64.bat". This will set the required VC variables for > using the x64 compiler tools. > - Try building SOCI again with the same command, but also including > these options: -G "NMake Makefiles" -DCMAKE_INSTALL_PREFIX=C:\SOCI > - Run "nmake" > - Run "nmake install" > - If everything goes well, you'll find the installed SOCI files in C:\SOCI. > > Hope it helps. > > PS: Remember, the benefit of using a free tool is at the price of > support. If you make a question to a user's list and get an answer, > consider yourself lucky. :) > > > Erasmo. > > > -----Original Message----- > From: john [mailto:j...@dgi.com] > Sent: jueves 17 de noviembre de 2016 7:11 p. m. > To: soci-users@lists.sourceforge.net > Subject: [soci-users] Does SOCI support VisualStudio 2015/VC 14? > > I posted this question on 2016-09-16 but have not seen a response. Does > anybody know whether or not SOCI supports VisualStudio 2015? Here's my > original question: > > 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 > > > ---------------------------------------------------------------------- > -------- _______________________________________________ > soci-users mailing list > soci-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/soci-users > > ---------------------------------------------------------------------- > -------- _______________________________________________ > soci-users mailing list > soci-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/soci-users > > ------------------------------------------------------------------------------ _______________________________________________ soci-users mailing list soci-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/soci-users