Showing posts with label ubuntu. Show all posts
Showing posts with label ubuntu. Show all posts

Thursday, October 25, 2012

Compiling C++ code after Ubuntu 12.10 upgrade...

Recently upgraded to Ubuntu 12.10 quantal and almost immediately found out that Omnet++ is not compiling any more :)

It turns out the issue is with the new gcc 4.7 compiler.

After Googling the issue, I stumbled on this post that help me fix it. The problem is with abspath.cc file that throws an error

 add the following lines to fix the issue:

#ifdef _WIN32
#include
#include
#else
#include

#endif

Thanks Georgi for posting it. It worked like a charm.

Hope it helps you as well.

Tuesday, October 18, 2011

Omnet++ vs Ubuntu 11.10 and the winner is....

Hey everyone,

Did you encounter any problems running Omnet++ simulation after an update to Ubuntu 11.10 (Oneiric) ?

Well if you are getting this error message:
 Error during startup: No user interface (Cmdenv, Tkenv, etc.) 
Then you will be happy to know there is a solution! Yes, all the credit goes to Omnet++ team, specially Horning Rudolf for posting the solution here.

It is very simple:

In Makefile.inc.in find the following lines (towards the end): 
CMDENV_LIBS = -u _cmdenv_lib -loppcmdenv$D -loppenvir$D 
TKENV_LIBS = -u _tkenv_lib -lopptkenv$D -loppenvir$D -lopplayout$D 
and replace them with:
CMDENV_LIBS = -u _cmdenv_lib -Wl,--no-as-needed -loppcmdenv$D -loppenvir$D 

TKENV_LIBS = -u _tkenv_lib -Wl,--no-as-needed -lopptkenv$D -loppenvir$D
-lopplayout$D 

then
./configure
make clean
make 

This should work with all omnet 4.x version. Spread the info for other users
suffering from the issue. 



That's it. Enjoy and spread the word.