安装OMNET++ 4.1/4.3 (Ubuntu14.04)

 

提示:因为实验须要,安装的低版本的OMNET++,可能高版本的不会出现如下问题。Linux问题太多,能够用window尽可能用window(简直是一键安装成功好吗。。。。)php

 

前期准备请参照youtube视频,已下载到云盘:express

https://pan.baidu.com/s/1c1PVv1Iui

 

 

make MODE=release 中出现了一下问题:spa

问题一:debug

make[1]: *** [/home/ivyfan/ccnsim_new/omnetpp-4.1/out/gcc-release/src/utils/abspath] Error 1视频

make[1]: Leaving directory `/home/ivyfan/ccnsim_new/omnetpp-4.1/src/utils'token

make: *** [utils] Error 2ci

 

解决方法:get

在文件src/utils/abspath.cc中增长:#include <unistd.h>string

Save and compile again. Problem solved.

 

 

问题二:

make[1]: *** [/home/ivyfan/ccnsim_new/omnetpp-4.1/out/gcc-release/src/common/matchexpression.tab.o] Error 1

make[1]: Leaving directory `/home/ivyfan/ccnsim_new/omnetpp-4.1/src/common'

make: *** [common] Error 2

参考文件:https://dev.omnetpp.org/bugs/view.php?id=679&nbn=1

 

解决方法:在/src/common/matchexpression.y  →隐藏文件

共修改三处

 

1)

%token STRINGLITERAL

%token OR_ AND_ NOT_   /* note: cannot use %left/%right because of implicit "or" operator */

 

-%pure_parser   

+%pure-parser

+%param {void *statePtr}

 

%start expression

 

 

2)

 #include <string.h>         /* YYVERBOSE needs it */

 #endif

 

-void yyerror (const char *s);

+void yyerror (void *statePtr, const char *s);

 

 #include "matchexpression.h"

 #include "matchexpressionlexer.h"

 

 

3

void MatchExpression::parsePattern(std::vector<MatchExpression::Elem>& elems, coyyparse(&state);

 }

 

-void yyerror(const char *s)

+void yyerror(void *statePtr, const char *s)

 {

     // chop newline

     char buf[250];

 

 

 

问题三:build 第一个project的时候,出现报错:omnet++ library files for configuration "gcc-debug" were not found

解决方案: make MODE=debug CONFIGNAME=gcc-debug all

相关文章
相关标签/搜索