无法与Omnet ++一起使用GMP [英] Unable to use GMP with Omnet++
问题描述
我已经在ubuntu上安装了GMP.我从" https://gmplib.org "下载GMP-6.1.2.然后将其提取到Home文件夹中,安装如下:
I have installed GMP on ubuntu. I download GMP-6.1.2 from "https://gmplib.org".Then I extracted it in Home folder and installed like:
1. cd gmp-6.1.2
2../configure
3. make
4. sudo make install
5. make check
我检查了gmp已安装在"/usr/local"中,并打开了omnet并更改了以下路径: 我进入了Properties项目:
I checked,gmp was installed in "/usr/local" and I opened omnet and I change these paths: I entered Properties project:
1. in (c/c++ build | environment | path ), I added :
(/usr/local/include:/usr/local/lib) then I applied.
2. in (c/c++ General | paths and symbols | includes),I added
(/usr/local/include) in assembly, GNU c, GNU C++.then I applied.
在((c/c ++常规|路径和符号|库路径).我添加了(/usr/local/lib).然后我应用了.
At ( (c/c++ General | paths and symbols | Library paths). I added (/usr/local/lib). Then I applied.
也((c/c ++常规|路径和符号|库).我分别写了"gmpxx"和"gmp".然后我申请了.
Also ( (c/c++ General | paths and symbols | libraries). I wrote "gmpxx" and "gmp". Then I applied.
3. in (omnet++ | Makemake | select "src" folder | select Options |
custom | makefrag ) I added "EXTRA_OBJS=-lgmp". Then I applied them
and OK.
在那之后,我建立了我的项目,并收到了以下错误消息:
After that,I built my project and I received these errors :
描述资源路径位置类型 刷新Makefile时出错:/home/mar/Desktop/omnet_proj/id_2/test_independent/mixim-2.3/src/EXTRA_OBJS=-lgmp(无此类文件或目录)mixim-2.3未知Makefile问题
Description Resource Path Location Type Error refreshing Makefiles: /home/mar/Desktop/omnet_proj/id_2/test_independent/mixim-2.3/src/EXTRA_OBJS=-lgmp (No such file or directory) mixim-2.3 Unknown Makefile Problem
描述资源路径位置类型 在项目属性C/C ++问题的PATH mixim-2.3 [发现选项]页中找不到程序"gcc"
Description Resource Path Location Type Program "gcc" not found in PATH mixim-2.3 [Discovery Options] page in project properties C/C++ Problem
描述资源路径位置类型 PATH mixim-2.3 C/C ++问题中找不到程序"make"
Description Resource Path Location Type Program "make" not found in PATH mixim-2.3 C/C++ Problem
我必须说我正在Omnet ++中使用MIXIM. 我不知道发生了什么事?
I must say I am using MIXIM in Omnet++. I don't know what is going on?
能请你帮我吗?
谢谢您的帮助.
推荐答案
我认为我可以做到.
我已经在ubuntu中安装了gmp.然后,我在项目中添加了"gmp.h"和"gmpXX.h".
I have installed gmp in ubuntu. Then I added "gmp.h" and "gmpXX.h" to my project.
之后,我去了项目属性| omnet ++ |选择SRC |选项|链接|其他要链接的库:(-l选项),我插入了这两个Option: gmpxx,gmp.
After that,I went to project properties | omnet++ | select SRC | Options | link | Additional libraries to link with:(-l option) and I inserted these two Option: gmpxx , gmp .
此外,我在路径和符号(在项目属性中)|包括"和"/usr/local/lib"在路径和符号|库路径"中添加了"/usr/local/include".
Also,I added "/usr/local/include" in "paths and symbols(in project properties) | includes " and "/usr/local/lib" in " paths and symbols | library paths ".
此后,我在路径和符号(在项目属性中)|包括"和"/usr/lib/i386-linux-gnu"中的路径和符号|库路径"中添加了"/usr/include".
After that,I added "/usr/include" in "paths and symbols(in project properties) | includes " and "/usr/lib/i386-linux-gnu" in " paths and symbols | library paths ".
我没有任何错误地构建了我的项目.
And I built my project without any error.
最后,我运行了亲爱的Jurzy D的示例,没有任何错误.
At last,I run dear Jurzy D's example without any error.
我没有改变其他任何东西.
I did not change any thing else.
这篇关于无法与Omnet ++一起使用GMP的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!