Unable to use GMP with Omnet++

55 views
Skip to first unread message

marzieh ghasemi

unread,
Feb 8, 2017, 7:57:39 AM2/8/17
to omn...@googlegroups.com
Hello

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
I checked,gmp was installed in "/usr/local".
6. I opened omnet and I change this 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.
At ( (c/c++ General | paths and symbols | Library paths). I added (/usr/local/lib). Then I applied.
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 :
 
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

Description    Resource    Path    Location    Type
Program "gcc" not found in PATH    mixim-2.3        [Discovery Options] page in project properties    C/C++ Problem

Description    Resource    Path    Location    Type
Program "make" not found in PATH    mixim-2.3             C/C++ Problem

I must say I am using MIXIM in Omnet++.
I don't know what is going on?

Could you please help me?



Thank you in advance of your help.


marzieh ghasemi

unread,
Feb 10, 2017, 12:55:13 AM2/10/17
to OMNeT++ Users
0 down vote accept

I think I can do that.

I have installed gmp in ubuntu. Then I added "gmp.h" and "gmpXX.h" to my project.

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 . And I built my project without any error.

At last,I run dear Jurzy D's example without any error.

Also,I added "/usr/local/include" in "paths and symbols(in project properties) | includes " and "/usr/local/lib" in " paths and symbols | library paths ".


Also,I added "/usr/include" in "paths and symbols(in project properties) | includes " and "/usr/lib/i386-linux-gnu" in " paths and symbols | library paths ".


I did not change any thing else.


I have one question why omnet doesn't show parameter names of macro expansion?

Reply all
Reply to author
Forward
0 new messages