2016-09-11 47 views
0

我對Omnet沒有太多經驗,我想知道是否正確運行命令來運行示例。動脈(靜脈分支)示例不起作用

首先,當我鍵入make Vanetza,我意識到,COHDA_MK2_ROOT缺失,然而,Vanetza編譯沒有錯誤:當我嘗試運行與根./run命令進入/動脈

mkdir extern/vanetza/build cd extern/vanetza/build && cmake -DCMAKE_BUILD_TYPE=Release .. -- The C compiler identification is GNU 5.4.0 -- The CXX compiler identification is GNU 5.4.0 -- Check for working C compiler: /usr/bin/cc -- Check for working C compiler: /usr/bin/cc -- works -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Detecting C compile features -- Detecting C compile features - done -- Check for working CXX compiler: /usr/bin/c++ -- Check for working CXX compiler: /usr/bin/c++ -- works -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done -- Detecting CXX compile features -- Detecting CXX compile features - done -- Boost version: 1.58.0 -- Boost version: 1.58.0 -- Found the following Boost libraries: -- date_time -- serialization -- Boost version: 1.58.0 -- Found the following Boost libraries: -- date_time -- Boost version: 1.58.0 -- Found the following Boost libraries: -- date_time -- Found GeographicLib: /usr/local/include (found suitable version "1.46", minimum required is "1.37") -- Boost version: 1.58.0 -- Found the following Boost libraries: -- serialization -- Found CryptoPP: /usr/include (found suitable version "5.6.1", minimum required is "5.6.1") **-- Could NOT find Cohda (missing: COHDA_MK2_ROOT)** -- Boost version: 1.58.0 -- Found the following Boost libraries: -- system -- Configuring done -- Generating done

/場景/動脈,它返回:

./run: 2: ./run: ../../run: not found 

當我嘗試運行opp_run命令到同一文件夾,我可以打開OMNET,但是,模擬不因爲Scenari運行o.ned缺失。

我該怎麼辦?

回答

1

那些運行腳本現在已經過時。您可以通過新的運行目標運行模擬,即scenarios/artery文件夾中的場景可以由構建目錄中的run_example目標執行。

如果你遵循了動脈的README構建指令那麼它看起來像這樣:

cd build 
make run_example 

您還可以啓動仿真環境線槽debug_example目標,如果你有CMAKE_BUILD_TYPE設置爲「調試」建成, 「無法找到Cohda(缺少:COHDA_MK2_ROOT)」根本不是嚴重錯誤,它只是通知構建配置,而不需要此功能需要此可選依賴項。

+0

我運行了'make run_example'命令併發生錯誤。 SUMO停止並且日誌顯示文件「extern/veins/examples/veins/erlangen.net.xml」不存在,爲了解決這個問題我複製了.net.xml,rou.xml,poly.xml和sumo。 cfg從靜脈示例文件夾到場景/動脈。之後,我從launchd.xml文件中刪除了行。它工作正常。謝謝拉斐爾! – Rhu

+1

靜態的sumo-launchd.py腳本對啓動它的目錄很敏感。我建議通過'make launch_sumo'爲Artery調用這個腳本。那麼你不需要複製任何文件。 –