[mlpack-git] [mlpack/mlpack] Building mlpack-2.0.3 on Windows 10 with MSVC 19 (#794)

Asad. Gharighi notifications at github.com
Wed Sep 28 18:19:28 EDT 2016


I tried to follow [these steps](http://keon.io/mlpack-on-windows.html), everything went fine except generating MS Visual Studio solution failed with an error which shows the intermediate/temp .vcxproj is using a GNU C++ compiler template instead of the MSVC's. This is my first try with cmake, so do you think I should check sth inside mlpack cmake files or it may be some bug in cmake?

**Here's the error dump:**

Performing C++ SOURCE FILE Test COMPILER_HAS_DEPRECATED_ATTR failed with the following output:
Change Dir: C:/home/src/mlpack-2.0.3/build/CMakeFiles/CMakeTmp

Run Build Command:"C:/Program Files (x86)/MSBuild/14.0/bin/MSBuild.exe" "cmTC_2cc0c.vcxproj" "/p:Configuration=Debug" "/p:VisualStudioVersion=14.0"
Microsoft (R) Build Engine version 14.0.25420.1

Copyright (C) Microsoft Corporation. All rights reserved.



Build started 9/28/2016 6:46:04 PM.

Project "C:\home\src\mlpack-2.0.3\build\CMakeFiles\CMakeTmp\cmTC_2cc0c.vcxproj" on node 1 (default targets).

PrepareForBuild:

  Creating directory "cmTC_2cc0c.dir\Debug\".

  Creating directory "C:\home\src\mlpack-2.0.3\build\CMakeFiles\CMakeTmp\Debug\".

  Creating directory "cmTC_2cc0c.dir\Debug\cmTC_2cc0c.tlog\".

InitializeBuildStatus:

  Creating "cmTC_2cc0c.dir\Debug\cmTC_2cc0c.tlog\unsuccessfulbuild" because "AlwaysCreate" was specified.

ClCompile:

  C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin\x86_amd64\CL.exe /c /Zi /W3 /WX- /Od /Ob0 /D WIN32 /D _WINDOWS /D COMPILER_HAS_DEPRECATED_ATTR /D _DEBUG /D "CMAKE_INTDIR=\"Debug\"" /D _MBCS /Gm- /EHsc /RTC1 /MDd /GS /fp:precise /Zc:wchar_t /Zc:forScope /Zc:inline /GR /openmp /Fo"cmTC_2cc0c.dir\Debug\\" /Fd"cmTC_2cc0c.dir\Debug\vc140.pdb" /Gd /TP /errorReport:queue  -O3 "C:\home\src\mlpack-2.0.3\build\CMakeFiles\CMakeTmp\src.cxx"

  Microsoft (R) C/C++ Optimizing Compiler Version 19.00.24215.1 for x64

  Copyright (C) Microsoft Corporation.  All rights reserved.

  

  cl /c /Zi /W3 /WX- /Od /Ob0 /D WIN32 /D _WINDOWS /D COMPILER_HAS_DEPRECATED_ATTR /D _DEBUG /D "CMAKE_INTDIR=\"Debug\"" /D _MBCS /Gm- /EHsc /RTC1 /MDd /GS /fp:precise /Zc:wchar_t /Zc:forScope /Zc:inline /GR /openmp /Fo"cmTC_2cc0c.dir\Debug\\" /Fd"cmTC_2cc0c.dir\Debug\vc140.pdb" /Gd /TP /errorReport:queue  -O3 "C:\home\src\mlpack-2.0.3\build\CMakeFiles\CMakeTmp\src.cxx"

  

cl : Command line warning D9002: ignoring unknown option '-O3' [C:\home\src\mlpack-2.0.3\build\CMakeFiles\CMakeTmp\cmTC_2cc0c.vcxproj]

  src.cxx

C:\home\src\mlpack-2.0.3\build\CMakeFiles\CMakeTmp\src.cxx(1): error C2065: '__deprecated__': undeclared identifier [C:\home\src\mlpack-2.0.3\build\CMakeFiles\CMakeTmp\cmTC_2cc0c.vcxproj]

C:\home\src\mlpack-2.0.3\build\CMakeFiles\CMakeTmp\src.cxx(1): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int [C:\home\src\mlpack-2.0.3\build\CMakeFiles\CMakeTmp\cmTC_2cc0c.vcxproj]

C:\home\src\mlpack-2.0.3\build\CMakeFiles\CMakeTmp\src.cxx(1): error C2448: '__attribute__': function-style initializer appears to be a function definition [C:\home\src\mlpack-2.0.3\build\CMakeFiles\CMakeTmp\cmTC_2cc0c.vcxproj]

Done Building Project "C:\home\src\mlpack-2.0.3\build\CMakeFiles\CMakeTmp\cmTC_2cc0c.vcxproj" (default targets) -- FAILED.



Build FAILED.



"C:\home\src\mlpack-2.0.3\build\CMakeFiles\CMakeTmp\cmTC_2cc0c.vcxproj" (default target) (1) ->

(ClCompile target) -> 

  cl : Command line warning D9002: ignoring unknown option '-O3' [C:\home\src\mlpack-2.0.3\build\CMakeFiles\CMakeTmp\cmTC_2cc0c.vcxproj]





"C:\home\src\mlpack-2.0.3\build\CMakeFiles\CMakeTmp\cmTC_2cc0c.vcxproj" (default target) (1) ->

(ClCompile target) -> 

  C:\home\src\mlpack-2.0.3\build\CMakeFiles\CMakeTmp\src.cxx(1): error C2065: '__deprecated__': undeclared identifier [C:\home\src\mlpack-2.0.3\build\CMakeFiles\CMakeTmp\cmTC_2cc0c.vcxproj]

  C:\home\src\mlpack-2.0.3\build\CMakeFiles\CMakeTmp\src.cxx(1): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int [C:\home\src\mlpack-2.0.3\build\CMakeFiles\CMakeTmp\cmTC_2cc0c.vcxproj]

  C:\home\src\mlpack-2.0.3\build\CMakeFiles\CMakeTmp\src.cxx(1): error C2448: '__attribute__': function-style initializer appears to be a function definition [C:\home\src\mlpack-2.0.3\build\CMakeFiles\CMakeTmp\cmTC_2cc0c.vcxproj]



    1 Warning(s)

    3 Error(s)



Time Elapsed 00:00:00.44


Source file was:
__attribute__((__deprecated__)) int somefunc() { return 0; }
    int main() { return somefunc();}


-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/mlpack/mlpack/issues/794
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.cc.gatech.edu/pipermail/mlpack-git/attachments/20160928/5de45443/attachment.html>


More information about the mlpack-git mailing list