【问题标题】:Some ns-3 building errors in cygwin windows7-64bitcygwin windows7-64bit 中的一些 ns-3 构建错误
【发布时间】:2016-10-21 05:33:40
【问题描述】:

最近我需要在 ns-3 中做一些网络模拟,但是 ns-3 在 Linux 上工作。所以我在我的 Windows 7 上安装了一个 cygwin,并安装了 'Base''Devel''Python' 模块,就像教程显示的那样。

第一个问题是当我使用命令构建 ns-3 时

./build.py

然后它显示了一些奇怪的东西

$ ./build.py
# Skip NetAnim (platform not supported)
# Build NS-3
Entering directory `./ns-3-dev'
Note: configuring ns-3 without pybindgen
 =>  /usr/bin/python waf configure
Setting top to                           : /home/Dell/workspace/ns-3-allinone/ns-3-dev
Setting out to                           : /home/Dell/workspace/ns-3-allinone/ns-3-dev/build
Checking for 'gcc' (C compiler)          : /usr/bin/gcc
Checking for cc version                  : 5.4.0
Checking for 'g++' (C++ compiler)        : /usr/bin/g++
Python is not supported in CygWin environment.  Try MingW instead.

最后一行很奇怪,因为它跳过了python检查,但是这一行

'configure' finished successfully (45.850s)

还是出现了。 那我应该忽略它吗?

第二个问题是当构建继续时,类似

[ 966/1741] Compiling src/spectrum/model/aloha-noack-mac-header.cc
../src/wifi/model/dsss-error-rate-model.cc: In static function ‘static double ns3::DsssErrorRateModel::DqpskFunction(double)’:
../src/wifi/model/dsss-error-rate-model.cc:38:54: Error:‘M_PI’ is not declared in this scope.
   return ((std::sqrt (2.0) + 1.0) / std::sqrt (8.0 * M_PI * std::sqrt (2.0)))
                                                      ^

Waf: Leaving directory `/home/Dell/workspace/ns-3-allinone/ns-3-dev/build'
Build failed

显示。所以我搜索了这个问题,发现它可能是由我的 c 编译器引起的。但没有解决办法。

那我该怎么办? (对不起 4 我的英语很差...)

【问题讨论】:

  • 检查 CFLAGS 或 CXXFLAGS 是否包含任何限制范围的“-std=..”标志。
  • 你能更具体地描述一下吗?我以前从未使用过 cygwin 或 linux...

标签: cygwin ns-3


【解决方案1】:

问题解决了。我必须忘记一些必要的插件。如果你有同样的问题,只需从互联网上找到一个安装列表,并确保使用“sudo”命令安装所有插件,如 g++ 和 python。

【讨论】:

    猜你喜欢
    • 2013-12-02
    • 1970-01-01
    • 1970-01-01
    • 2017-09-09
    • 1970-01-01
    • 2015-12-14
    • 2023-03-05
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多