2015-10-01 55 views
1

試圖運行在32位C++/MFC解決方案聲納亞軍我得到了錯誤:聲納亞軍:無法抽取版本的Microsoft的編譯器

聲納亞軍:無法提取微軟編譯器的

版本

這裏是輸出:

11:56:44.856 INFO - 18645 files indexed 
11:57:02.381 INFO - Quality profile for c: Sonar way 
11:57:02.381 INFO - Quality profile for cpp: Sonar way 
11:57:02.540 INFO - cpp EVALUATION [Expiration: 2015-10-13, Server: *] 
11:57:02.540 INFO - Sensor Lines Sensor 
11:57:02.747 INFO - Sensor Lines Sensor (done) | time=207ms 
11:57:02.747 INFO - Sensor QProfileSensor 
11:57:02.749 INFO - Sensor QProfileSensor (done) | time=2ms 
11:57:02.750 INFO - Sensor InitialOpenIssuesSensor 
11:57:02.754 INFO - Sensor InitialOpenIssuesSensor (done) | time=4ms 
11:57:02.755 INFO - Sensor ProjectLinksSensor 
11:57:02.759 INFO - Sensor ProjectLinksSensor (done) | time=4ms 
11:57:02.759 INFO - Sensor VersionEventsSensor 
11:57:02.764 INFO - Sensor VersionEventsSensor (done) | time=5ms 
11:57:02.764 INFO - Sensor SquidSensorC 
11:57:02.766 INFO - C/C++ Preprocessor in silent mode. Relaunch the analysis wi 
th "sonar.verbose=true" to see issues encountered by the preprocessor. 
11:57:03.214 INFO - Using build-wrapper output: E:\dev\ProjectDir\build 
-wrapper-out\build-wrapper-dump.json 
INFO: ------------------------------------------------------------------------ 
INFO: EXECUTION FAILURE 
INFO: ------------------------------------------------------------------------ 
Total time: 28.126s 
Final Memory: 17M/200M 
INFO: ------------------------------------------------------------------------ 
ERROR: Error during Sonar runner execution 
ERROR: Unable to execute Sonar 
ERROR: Caused by: Unable to extract version of Microsoft Compiler 

環境:

  1. 視窗7 64位
  2. sonarqube-5.1.2
  3. 聲納澆道-DIST-2.4
  4. 集結包裝-3.6
  5. 聲納-CPP-插件-3.6
  6. 爪哇1.8 32位

不限想法可能會導致這個問題?

回答

0

build-wrapper生成一個名爲'build-wrapper-dump.json'的文件。如果你打開這個文件,你會看到頂部有一個名爲「捕捉」的部分。它可能看起來像這樣:

"captures":[ 
{ 
"compiler":"msvc-cl", 
"executable":"C:\\Program Files (x86)\\Microsoft Visual Studio 12.0\\VC\\bin\\x86_amd64\\CL.exe", 
"stdout":"", 
"stderr":"" 
} 

雖然它看起來應該是這樣:

"captures":[ 
{ 
"compiler":"msvc-cl", 
"executable":"C:\\Program Files (x86)\\Microsoft Visual Studio 12.0\\VC\\bin\\x86_amd64\\CL.exe", 
"stdout":"usage: cl [ option... ] filename... [ \/link linkoption... ]\r\n", 
"stderr":"Microsoft (R) C\/C++ Optimizing Compiler Version 18.00.40629 for x64\r\nCopyright (C) Microsoft Corporation. All rights reserved.\r\n\r\n" 
} 

要得到你需要從Visual Studio命令提示符下執行集結包裝的缺失值。此命令提示符設置一些額外的環境變量。希望這可以幫助。