A.SDR
A.SDR

Reputation: 187

Missing user interface when runnig OMNeT++ example

I was trying to integrate one of the OMNeT++ systemc example onto our framework (SoCRocket) and after some effort i succeeded to build one of the examples but when i try to run it i get the following error:

OMNeT++ Discrete Event Simulation  (C) 1992-2018 Andras Varga, OpenSim Ltd.
Version: 5.4.1, build: 180629-5e28390, edition: Academic Public License -- NOT FOR COMMERCIAL USE
See the license for distribution terms and warranty disclaimer


<!> Error: No user interface (Cmdenv, Tkenv, etc.) found

End.

Just to know, I disabled the shared libraries option and i have built OMNeT++ in release mode. i have the following libraries in /omnet/lib/:

omnet/lib/
├── liboppcmdenv.a
├── liboppcommon.a
├── liboppenvir.a
├── liboppeventlog.a
├── libopplayout.a
├── liboppmain.a
├── liboppnedxml.a
├── liboppqtenv.a
├── liboppqtenv-osg.a
├── liboppscave.a
├── liboppsim.a
└── liboppsystemc.a

Is something missing, Anyone have an idea?

Edit

Script used to build a code in the framework:

def build(bld):
      
    bld(
        target       = 'example1.platform',
        features     = 'cxx cprogram',
        source       = '/forkjoin/forkjoin.cc SC_Wrapper.cc',
        includes     = '.',
        use          = [
                       'oppsystemc','oppmain','oppenvir','oppsim','oppcommon','oppnedxml','oppcmdenv','oppeventlog','opplayout','oppqtenv','oppqtenv-osg','oppscave','xml2','mpi','mpi_cxx','dl'
                       ],
    )

Upvotes: 0

Views: 240

Answers (1)

Attila
Attila

Reputation: 1493

It might be that the linker simply "optimizes out" the user interface libraries.

There are some dummy functions in each user interface library, called qtenv_lib, tkenv_lib, and cmdenv_lib, precisely to give a "handle" for each library.

Try adding some linker flags to "force-link" these libraries, by "undefining" some of these symbols. Something like the --undefined or --require-defined options should do it. The standard OMNeT++ build process also adds these, for the same reason. You might need to prepend an underscore (_) to the function name to get the symbol name.

EDIT:

Oh, with static libraries, maybe you should use --whole-archive instead.

Upvotes: 1

Related Questions