This is a static archive of our old Q&A Site. Please post any new questions and answers at ask.wireshark.org.

error on generating build files

0

I have following issue when I used the following command on visual studio cmd window.

also I have visual studio 2015 installed on windows 7

Cmd used:  cmake -DENABLE_CHM_GUIDES=on -G "Visual Studio 12 Win64" C:\Development\wireshark

error displayed:The C compiler identification is unknown The CXX compiler identifcation is unknown

CMake error at CmakeLists.txt:22

No CMAKE_CXX_COMPLIER could be found

asked 01 Dec ‘15, 04:58

Tony_2013's gravatar image

Tony_2013
11559
accept rate: 0%

edited 01 Dec ‘15, 05:19

grahamb's gravatar image

grahamb ♦
19.8k330206


One Answer:

0

You have specified Visual Studio 2013 in the CMake generator parameter `-G Visual Studio 12 Win64" and CMake couldn't find it.

For VS2015, which isn't currently supported by the Wireshark build, you would need to pass the parameter -G Visual Studio 14 Win64.

You can see all the CMake generators supported by passing a plain -G to CMAKE.

answered 01 Dec '15, 05:09

grahamb's gravatar image

grahamb ♦
19.8k330206
accept rate: 22%

Thanks for coming back

Now I have following issue after I went through as you have suggested.

Please kindly advise me.

C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC>cmake -DENABLE_CHM_GUIDES
=on -G "Visual Studio 14 Win64" C:\Development\wireshark
-- 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 Win64
-- Check for working C compiler using: Visual Studio 14 2015 Win64 -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working CXX compiler using: Visual Studio 14 2015 Win64
-- Check for working CXX compiler using: Visual Studio 14 2015 Win64 -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Generating build using CMake 3.4.0
-- Found POWERSHELL: C:/Windows/System32/WindowsPowerShell/v1.0/powershell.exe

– Building for win64 using Visual Studio 14 2015 Win64 C:\Development\wireshark\tools\win-setup.ps1 : Cannot validate argument on para meter 'Destination'. The "$_ -like "*\wireshark-*-libs"" validation script for the argument with value "C:\Development" did not return true. Determine why the validation script failed and then try the command again. At line:1 char:62

  • . "C:\Development\wireshark\tools\win-setup.ps1" -Destination <<<< C:\Develo pment \wireshark-win64-libs -Platform win64 -VSVersion 14
    • CategoryInfo : InvalidData: (:) [win-setup.ps1], ParameterBindi ngValidationException
    • FullyQualifiedErrorId : ParameterArgumentValidationError,win-setup.ps1

CMake Error at CMakeLists.txt:133 (message): Windows setup (win-setup.ps1) failed.

– Configuring incomplete, errors occurred! See also "C:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/CMakeFiles/CMak eOutput.log". See also "C:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/CMakeFiles/CMak eError.log".

C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC>

(01 Dec ‘15, 07:22) Tony_2013

It appears that you didn’t follow the Developers Guide correctly. Section 2.3.2 asks you to:

  1. Set some environment variables
  2. Create a build directory, and cd into it.

From the error you show, it looks like the env vars aren’t set, and from the path in the prompt it looks like you haven’t created a build directory. Instead you’re attempting to run from the VC directory.

What have you set for the required env vars?

(01 Dec ‘15, 08:14) grahamb ♦

I did set following vars as it shown below.

>set CYGWIN=nodosfilewarning
>set WIRESHARK_BASE_DIR=C:\Development
>set WIRESHARK_TARGET_PLATFORM=win64
>set QT5_BASE_DIR=C:\Qt\Qt5.5.0\5.5\msvc2015
>set WIRESHARK_VERSION_EXTRA=-YourExtraVersionInfo

Now i have changed the directory before I execute generate cmd. But I still get the following error.

C:\Development\wsbuild32>cmake -DENABLE_CHM_GUIDES=on -G "Visual Studio 14 Win64" C:\Development\wireshark
– 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 Win64
– Check for working C compiler using: Visual Studio 14 2015 Win64 – works
– Detecting C compiler ABI info
– Detecting C compiler ABI info - done
– Check for working CXX compiler using: Visual Studio 14 2015 Win64
– Check for working CXX compiler using: Visual Studio 14 2015 Win64 – works
– Detecting CXX compiler ABI info
– Detecting CXX compiler ABI info - done
– Detecting CXX compile features
– Detecting CXX compile features - done
– Generating build using CMake 3.4.0
– Found POWERSHELL: C:/Windows/System32/WindowsPowerShell/v1.0/powershell.exe

– Building for win64 using Visual Studio 14 2015 Win64 C:\Development\wireshark\tools\win-setup.ps1 : Cannot validate argument on parameter 'Destination'. The "$_ -like "*\wireshark-*-libs"" validation script for the argument with value "C:\Development" did not return true. Determine why the validation script failed and then try the command again. At line:1 char:62

  • . "C:\Development\wireshark\tools\win-setup.ps1" -Destination <<<< C:\Development \wireshark-win64-libs -Platform win64 -VSVersion 14
    • CategoryInfo : InvalidData: (:) [win-setup.ps1], ParameterBindingValidationException
    • FullyQualifiedErrorId : ParameterArgumentValidationError,win-setup.ps1

CMake Error at CMakeLists.txt:133 (message): Windows setup (win-setup.ps1) failed.

– Configuring incomplete, errors occurred! See also "C:/Development/wsbuild32/CMakeFiles/CMakeOutput.log".

(01 Dec ‘15, 09:05) Tony_2013

The PowerShell script win-setup.ps1 did not like the Destination argument of “C:\Development”.

This argument is generated by CMake from the WIRESHARK_BASE_DIR and WIRESHARK_LIB_DIR env vars. If you have defined WIRESHARK_LIB_DIR that value takes priority and defines the absolute path to the location for the 3rd party libs. If you haven’t set WIRESHARK_LIB_DIR, then you must define WIRESHARK_BASE_DIR and CMake will add on the appropriate lib path, in your case wireshark-win64-libs. The win-setup.ps1 script checks the argument to ensure it has the form \wireshark--libs, and as can be seen from your output, it doesn’t.

I suspect you have defined the env var WIRESHARK_LIB_DIR and set it to “C:\Development”. If this is the case, then undefine it.

Arguably win-setup.ps1 is being a bit pernickety in “requiring” the lib path to be of the form"\wireshark--libs, a patch to relax that would be considered.

(01 Dec ‘15, 13:20) grahamb ♦