Hi,

> It compiles as well! Nevertheless, if i try to use UDPPrinterServer in
> the Network.ned file of my application then Omnett++ says that the class
> is unknown.

I guess, that the UdpPrinterServer is not explicitly referenced in any
application source file, but loaded dynamically from within Omnet++, isn't it.

> I'm thinking that it's might be a linker problem because after compiling 
> there is libreflexlibrary.a file in omnetpp-debug/install-root/lib/ of
> my application. It seems to be a static library, so cannot load it at run
> time.

In the final build step, all application objects are linked to a bunch of
libraries. All referenced symbols of static libaries (archives) are
integrated into the final executable. Non-referenced symbols are removed.

> Does anybody have an idea? Is there a way to generate a dynamic library
> instead of a static one? Is it possible that the compiler removes
> "unused" libraries for optimization which makes the class unknown?

If my guess above is true, then it will probably work with dynamic
libraries. Just change the product type of the library that contains
UdpPrinterServer to "dynamiclibary" and add the library path to the run
script. The latter is not necessary if You use the 'qbs run' command which
already gives You a console with all library paths correctly set.

BTW: What is reflexlibrary?

Richard

Antwort per Email an