OMNeT++ Community Site
  Welcome to OMNeT++ Community Site Wednesday, January 07 2009 

Mailing list archive (omnetpp-l at omnetpp.org)


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Omnetpp-l] How to attach C++ classes to omnet



Hello Sara,

I'm not sure what you mean by "adding", but in case you just want to
"use" those classes in your simulation, you can easily do that.

Let's say you put "StringTokenizer.cc" and "StringTokenizer.h" (and
other source files as well) on "utils" subdirectory for ease of
maintenance. After compiling the source file and getting an object
file there, return back to your root directory and provide additional
options to "opp_makemake" when running it as follows:

opp_makemake -f -I./utils ./utils/StringTokenizer.o

The resulting makefiles will correctly generate an executable linked
with "StringTokenizer.o".

Of course, you need to include "StringTokenizer.h" in source files
where you want to use the class.

Please, refer to help messages for details by typing "opp_makemake
-h"; in a similar way, you can include bigger, 3rd-party libraries as
well.

Regards,
Joseph


2008/9/3 sara lazaro <sarachiquita at xxx>:
> Hi all,
> I'm working under linux ubuntu.
>
> I have utility classes on c++ for simple stuff like
> - open & close a file,
>  Let's say these classes would be similar to class StringTokenizer,
> my question is how I can add them to my omnet simulation, I mean, they
> wouldn't be able to inherit from cSimpleModule. Would I add them like a
> SIM_API?
> Could anyone tell me where I should attach my classes?
> I would be very greatful for any hints,
> Sara
>
>
>
>
> _______________________________________________
> Omnetpp-l mailing list
> Omnetpp-l at xxx
> http://lists.omnetpp.org/mailman/listinfo/omnetpp-l
>
_______________________________________________
Omnetpp-l mailing list
Omnetpp-l at xxx
http://lists.omnetpp.org/mailman/listinfo/omnetpp-l

Home | Main Index | Thread Index


 Copyright © 2009 OMNeT++ Community Site
 All trademarks and copyrights on this page are owned by their respective owners.
Powered By GeekLog v1.3.7sr1 
Page created in 0.04 seconds