OPNET路径问题

6815阅读 3评论2010-07-05 daisypan
分类:WINDOWS

  今天试了一下Understanding MANET Model Internals and Interfaces里边的例子,说明里边需要在Edit->preference里边的comp_flags_common路径加上例子所在的路径,然后再做一些其他修改。我按照要求做了,结果不知道是例子的问题还是我自己设置有问题,例子(1941的project)跑的时候总是会报错,
----
<<>>
Process model (aodv_rte) compilation failed
due to error on source line (1096)
Error given in file (C:\...)
----
...
 
例子有错误,我就不暂时不去看了,继续回到OPNET自带的MANET的例子,系统自带的例子我昨天跑得好好的,今天跑就出现很多错了,每次仿真都报错,错误跟刚才跑1941的例子一样,每个例子都不行。我把之前的环境设置全都还原了,问题依旧。郁闷了,就把OPNET卸载了,重新安装一遍,结果问题还是一样。我一气之下,就把Understanding MANET Model Internals and Interfaces的例子的所在的文件夹都删除了,重新启动OPNET,系统弹出:
The primary model directory (C:\Op_model) does not exist. Attempts to save new models will fail until this problem is corrected
点击OK,试着run一下,虽然还是会报错,但是还是能编译到最后了,看来只要把刚才的那个路径问题解决了就差不多了,到网上一搜,找到解决办法:
You can override the default user home directory by setting a shell variable 'opnet_user_home' to whatever directory you want OPNET to use as your home directory. On Windows, set this shell variable by going to Start->Control Panel->System->Environment and set a system or user variable 'opnet_user_home' to the desired home directory (e.g., C:\my_home_dir). 

After setting the variable, test to make sure the variable was set correctly: 
a) open a new command prompt 
b) type 'set' 
c) visually scan through the list of variables, and make sure opnet_user_home is now set to your desired home directory. 
 
中文XP系统的话,步骤为:开始->控制面板->系统->高级->环境变量->在管理员变量里边添加一个新建文件夹(自己新建的空文件夹,路径为D:\opnet_try),确定之后,开始->运行,cmd,然后输入set,确定刚才我添加的环境变量起作用了,然后重新启动OPNET。OK,问题解决了,原来能跑的程序,现在恢复正常了。
 
我也觉得奇怪,怎么会出现这些问题,只是把自己的遇到的问题记下来~OPNET的使用依旧很头疼,想自己重复实现一次MANET里边简单的例子,都办不到,头疼。。。
 
上一篇:VMware虛擬機中滑鼠中鍵無法使用的問題
下一篇:OPNET中MANET节点之间数据产生

文章评论