Re: Win32 Make
Ramiro Morales <[email protected]>
| Newsgroups | gmane.comp.db.tds.freetds |
|---|---|
| Message-ID | <CAO7PdF-+K6D9T02r4jQEQXjou-yHsfjUkK9Pb9QtYA0FWL0QRg@mail.gmail.com> |
On Wed, Jul 29, 2015 at 1:17 PM, Michael Becker <[email protected]> wrote: > Hi, > > I am using > Visual Studio 2015 > cmake 3.3.0-rc4 > freetds-0.95.18 > > running > > cmake -G "NMake Makefiles" . > > does not find vsnprintf nor _vsnprintf Exactly, I've seen also this because I've started experimenting to add VS 2015 to the Appveyor build matrix (VS 2015 is used to compile soon to-be-released Python 3.5 so we'll need that to build pymssql): https://github.com/FreeTDS/freetds/compare/master...ramiro:ci-appveyor-visual-studio-2015 https://ci.appveyor.com/project/ramiro/freetds/build/246/job/2lgrjkmg2w5agf72#L307 I wonder if Visual Studio 2012/2013/etc has the same issue we know VS 2008/2010 don't because we have them in the matrix already. Doesn't seem to be a Cmake problem, we are using an older version (but not so much and certainly non-RC). > as result of this the file src\replacements\vasprintf.c can not be compiled > adding "#define _VSNPRINTF 1" to include\config.h solves the problem > > is there a better solution? Haven't found one so far. I've been able to extract the following information from the Appveyor build slave VM though (the ability con connect via RDP to the slave is super-useful in these cases): Console excerpt: Using MSVC 2008 build environment for 32 bit architecture Setting environment for using Microsoft Visual Studio 2008 x86 tools. Executing: cmake -G "NMake Makefiles" -DCMAKE_BUILD_TYPE=Release .. -- The C compiler identification is MSVC 15.0.30729.1 -- The CXX compiler identification is MSVC 15.0.30729.1 -- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio 9.0/VC/bin/cl.exe -- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio 9.0/VC/bin/cl.exe -- works -- Detecting C compiler ABI info build\CMakeFiles\CMakeError.log file excerpt (presence of msvcrtd.lib is strange, we aren't performing a Debug build): [...] Determining if the function vsnprintf exists failed with the following output: Change Dir: C:/projects/freetds/build/CMakeFiles/CMakeTmp Run Build Command:"nmake" "/NOLOGO" "cmTryCompileExec3758173506\fast" "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\nmake.exe" -f CMakeFiles\cmTryCompileExec3758173506.dir\build.make /nologo -L CMakeFiles\cmTryCompileExec3758173506.dir\build "C:\Program Files (x86)\CMake\bin\cmake.exe" -E cmake_progress_report C:\projects\freetds\build\CMakeFiles\CMakeTmp\CMakeFiles 1 Building C object CMakeFiles/cmTryCompileExec3758173506.dir/CheckFunctionExists.c.obj C:\PROGRA~2\MI0E91~1.0\VC\bin\cl.exe @C:\Users\appveyor\AppData\Local\Temp\nm8F52.tmp CheckFunctionExists.c Linking C executable cmTryCompileExec3758173506.exe "C:\Program Files (x86)\CMake\bin\cmake.exe" -E vs_link_exe C:\PROGRA~2\MI0E91~1.0\VC\bin\link.exe /nologo @CMakeFiles\cmTryCompileExec3758173506.dir\objects1.rsp @C:\Users\appveyor\AppData\Local\Temp\nm901E.tmp CheckFunctionExists.c.obj : error LNK2019: unresolved external symbol _vsnprintf referenced in function _main MSVCRTD.lib(vsnprintf.obj) : error LNK2001: unresolved external symbol _vsnprintf MSVCRTD.lib(vsnprintf.obj) : error LNK2001: unresolved external symbol __vsnprintf cmTryCompileExec3758173506.exe : fatal error LNK1120: 2 unresolved externals LINK Pass 1 failed. with 1120 NMAKE : fatal error U1077: '"C:\Program Files (x86)\CMake\bin\cmake.exe"' : return code '0xffffffff' Stop. NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\nmake.exe"' : return code '0x2' Stop. Determining if the function _vsnprintf exists failed with the following output: Change Dir: C:/projects/freetds/build/CMakeFiles/CMakeTmp Run Build Command:"nmake" "/NOLOGO" "cmTryCompileExec430257698\fast" "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\nmake.exe" -f CMakeFiles\cmTryCompileExec430257698.dir\build.make /nologo -L CMakeFiles\cmTryCompileExec430257698.dir\build "C:\Program Files (x86)\CMake\bin\cmake.exe" -E cmake_progress_report C:\projects\freetds\build\CMakeFiles\CMakeTmp\CMakeFiles 1 Building C object CMakeFiles/cmTryCompileExec430257698.dir/CheckFunctionExists.c.obj C:\PROGRA~2\MI0E91~1.0\VC\bin\cl.exe @C:\Users\appveyor\AppData\Local\Temp\nm932A.tmp CheckFunctionExists.c Linking C executable cmTryCompileExec430257698.exe "C:\Program Files (x86)\CMake\bin\cmake.exe" -E vs_link_exe C:\PROGRA~2\MI0E91~1.0\VC\bin\link.exe /nologo @CMakeFiles\cmTryCompileExec430257698.dir\objects1.rsp @C:\Users\appveyor\AppData\Local\Temp\nm93E7.tmp CheckFunctionExists.c.obj : error LNK2019: unresolved external symbol __vsnprintf referenced in function _main cmTryCompileExec430257698.exe : fatal error LNK1120: 1 unresolved externals LINK Pass 1 failed. with 1120 NMAKE : fatal error U1077: '"C:\Program Files (x86)\CMake\bin\cmake.exe"' : return code '0xffffffff' Stop. NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\nmake.exe"' : return code '0x2' Stop. [...] Regards, -- Ramiro Morales @ramiromorales