提示:因爲實驗須要,安裝的低版本的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