Cannot Configure using cmake-gui 3.8.0-rc2 on windows

Issue #1 closed
Former user created an issue

Try to compile on windows and get the following error

"C:_Work\code\C++\vector_blf\build\CMakeFiles\CMakeTmp\cmTC_84ec4.vcxproj" (default target) (1) ->

(ClCompile target) ->

C:_Work\code\C++\vector_blf\build\CMakeFiles\CMakeTmp\src.cxx(1): error C2065: 'deprecated': undeclared identifier [C:_Work\code\C++\vector_blf\build\CMakeFiles\CMakeTmp\cmTC_84ec4.vcxproj]

C:_Work\code\C++\vector_blf\build\CMakeFiles\CMakeTmp\src.cxx(1): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int [C:_Work\code\C++\vector_blf\build\CMakeFiles\CMakeTmp\cmTC_84ec4.vcxproj]

C:_Work\code\C++\vector_blf\build\CMakeFiles\CMakeTmp\src.cxx(1): error C2448: 'attribute': function-style initializer appears to be a function definition [C:_Work\code\C++\vector_blf\build\CMakeFiles\CMakeTmp\cmTC_84ec4.vcxproj]

0 Warning(s)

3 Error(s)

Comments (8)

  1. Tobias Lorenz repo owner

    Hi Anonymous,

    the warnings result from a combination of CMake and your Visual Studio compiler. CMake passes the configure step, but during the compile step certain feature test compilations seem to happen. With your new Visual Studio version some codes seem to be marked as deprecated (C2065, C4430, C2448).

    My Continuous Integration successfully compiled the software with cmake-3.4.3 and Visual Studio 2012, 2013 and 2015 and also using different other combinations under Linux. My compilation never created the src.cxx file.

    An intermediate solution is to disable the warnings using "#pragma warning (disable: 2065)" in src/Vector/BLF/platform.h (same for the other warnings), but this might hide actual issues.

    I try to get a newer compiler and CMake-3.8.0-rc2 to reproduce the issue. Can you give me more information about the compiler you used (version and edition) and also for what target you try to compile (Intel, ARM, 32 bit, 64 bit, ...)?

    Bye Tobias

  2. Tobias Lorenz repo owner

    Hi again,

    I've installed cmake-3.8.0-rc2 64-bit in combination with VS2012. No issues in this combination. Still I need to get a newer VS version, ideally the same as yours.

    The compilation error happens in src.cxx, which is a file generated by CMake modules during compilation. One of them is CheckCXXSourceRuns.cmake, however I don't see any other module using it. Then there is CheckCXXSourceCompiles.cmake, and that is indeed used by some other modules, including one that we directly use: GenerateExportHeaders.cmake.

    I can try one thing: Newer versions deprecated the way I use GenerateExportHeaders and I've already changed the use in my other modules. I can do the same changes in Vector_BLF and maybe this also solves your issue.

    Bye Tobias

  3. Tobias Lorenz repo owner

    Can you test the aforementioned changeset? It's released as v1.1.0 and is currently the latest in master and v1.1 branch.

  4. Oliver Zokra

    Hello Mr. Lorenz, I really appreciate your work. Actually, I need to use your library in my project. I built the dbc library successfuly using cmake, I found the dll and Lib files then I can use them. However, when trying to do the same with the ascii library, cmake gives me a message that flex_target is missing. So I concluded that I have to get the flex library. Here is the problem. I couldn't find an easy way to get and compile the flex library. I found several links but it seems very complicated to do it. I tried a lot and I failed. Do you have a link that would help me? Actually, I am using visual studio 2017 on windows 7. Any single hint would be really important for me. Thank you!

  5. Log in to comment