default modules and function not working on Omnet++ 5.0

529 views
Skip to first unread message

Amogh Venkatanarayan

unread,
Nov 26, 2016, 11:26:58 AM11/26/16
to OMNeT++ Users
I am getting this error for a simple copy of TicToc1 project. It is not recognizing scheduleAt() or send() or gate() functions either.

Kindly help, it's a little urgent.


comp.cc
comp.cc:10:21: error: unknown class name 'cSimpleModule'; did you mean 'omnetpp::cSimpleModule'?
class Comp : public cSimpleModule
                    ^~~~~~~~~~~~~
                    omnetpp::cSimpleModule
E:/OMNETPP/omnetpp-5.0-src-windows/omnetpp-5.0/include/omnetpp/csimplemodule.h:62:15: note: 'omnetpp::cSimpleModule' declared here
class SIM_API cSimpleModule : public cModule //implies noncopyable
              ^
comp.cc:15:32: error: unknown type name 'cMessage'; did you mean 'omnetpp::cMessage'?
    virtual void handleMessage(cMessage *msg) override;
                               ^~~~~~~~
                               omnetpp::cMessage
E:/OMNETPP/omnetpp-5.0-src-windows/omnetpp-5.0/include/omnetpp/envirext.h:34:7: note: 'omnetpp::cMessage' declared here
class cMessage;
      ^
comp.cc:28:9: error: unknown type name 'cMessage'; did you mean 'omnetpp::cMessage'?
        cMessage *msg = new cMessage("tictocMsg");
        ^~~~~~~~
        omnetpp::cMessage
E:/OMNETPP/omnetpp-5.0-src-windows/omnetpp-5.0/include/omnetpp/envirext.h:34:7: note: 'omnetpp::cMessage' declared here
class cMessage;
      ^
comp.cc:28:29: error: unknown type name 'cMessage'; did you mean 'omnetpp::cMessage'?
        cMessage *msg = new cMessage("tictocMsg");
                            ^~~~~~~~
                            omnetpp::cMessage
E:/OMNETPP/omnetpp-5.0-src-windows/omnetpp-5.0/include/omnetpp/envirext.h:34:7: note: 'omnetpp::cMessage' declared here
class cMessage;
      ^
comp.cc:32:26: error: unknown type name 'cMessage'
void Comp::handleMessage(cMessage *msg)
                         ^
5 errors generated.
Makefile:98: recipe for target 'out/gcc-debug//comp.o' failed
make: *** [out/gcc-debug//comp.o] Error 1



Reply all
Reply to author
Forward
0 new messages