myidpt/PFSsim

compile error

Closed this issue · 1 comments

Hi, I met some error when compiling the PFSsim, below is the error information:


g++ -c -std=c++11 -O3 -march=native -mtune=native -DNDEBUG=1 -MMD -MP -MF out/gcc-release//client/application/Application.d -fPIC -fno-stack-protector -DHAVE_SWAPCONTEXT -DXMLPARSER=libxml -DWITH_PARSIM -DWITH_NETBUILDER -DWITH_OSGEARTH -I/users/lwh1990/omnetpp-5.2.1/include -I/users/lwh1990/PFSsim/omnetpp -o out/gcc-release//client/application/Application.o client/application/Application.cc
In file included from /users/lwh1990/PFSsim/omnetpp/iostreamer/ostreamer/DataPacketOutputStreamer.h:19:0,
from /users/lwh1990/PFSsim/omnetpp/iostreamer/StreamersFactory.h:23,
from client/application/Application.h:7,
from client/application/Application.cc:8:
/users/lwh1990/PFSsim/omnetpp/iostreamer/ostreamer/IPacketOutputStreamer.h:26:33: error: ‘cPacket’ does not name a type
virtual void writePacket(const cPacket * packet) = 0;
^
/users/lwh1990/PFSsim/omnetpp/iostreamer/ostreamer/IPacketOutputStreamer.h:26:43: error: ISO C++ forbids declaration of ‘packet’ with no type [-fpermissive]
virtual void writePacket(const cPacket * packet) = 0;
^
In file included from /users/lwh1990/PFSsim/omnetpp/iostreamer/StreamersFactory.h:23:0,
from client/application/Application.h:7,
from client/application/Application.cc:8:
/users/lwh1990/PFSsim/omnetpp/iostreamer/ostreamer/DataPacketOutputStreamer.h:33:25: error: ‘cPacket’ does not name a type
void writePacket(const cPacket * packet);
^
/users/lwh1990/PFSsim/omnetpp/iostreamer/ostreamer/DataPacketOutputStreamer.h:33:35: error: ISO C++ forbids declaration of ‘packet’ with no type [-fpermissive]
void writePacket(const cPacket * packet);
^
In file included from /users/lwh1990/PFSsim/omnetpp/iostreamer/StreamersFactory.h:24:0,
from client/application/Application.h:7,
from client/application/Application.cc:8:
/users/lwh1990/PFSsim/omnetpp/iostreamer/ostreamer/MetadataPacketOutputStreamer.h:33:25: error: ‘cPacket’ does not name a type
void writePacket(const cPacket * packet);
^
/users/lwh1990/PFSsim/omnetpp/iostreamer/ostreamer/MetadataPacketOutputStreamer.h:33:35: error: ISO C++ forbids declaration of ‘packet’ with no type [-fpermissive]
void writePacket(const cPacket * packet);
^
In file included from /users/lwh1990/PFSsim/omnetpp/iostreamer/StreamersFactory.h:25:0,
from client/application/Application.h:7,
from client/application/Application.cc:8:
/users/lwh1990/PFSsim/omnetpp/iostreamer/ostreamer/SchedulerPacketOutputStreamer.h:33:25: error: ‘cPacket’ does not name a type
void writePacket(const cPacket * packet);
^
/users/lwh1990/PFSsim/omnetpp/iostreamer/ostreamer/SchedulerPacketOutputStreamer.h:33:35: error: ISO C++ forbids declaration of ‘packet’ with no type [-fpermissive]
void writePacket(const cPacket * packet);
^
In file included from client/application/Application.cc:8:0:
client/application/Application.h:13:1: error: expected class-name before ‘{’ token
{
^
client/application/Application.h:36:24: error: ‘cMessage’ has not been declared
void handleMessage(cMessage * msg);
^
In file included from /users/lwh1990/omnetpp-5.2.1/include/omnetpp/cobject.h:26:0,
from /users/lwh1990/omnetpp-5.2.1/include/omnetpp/cnamedobject.h:23,
from /users/lwh1990/omnetpp-5.2.1/include/omnetpp/cownedobject.h:23,
from /users/lwh1990/omnetpp-5.2.1/include/omnetpp/carray.h:19,
from /users/lwh1990/omnetpp-5.2.1/include/omnetpp.h:28,
from client/application/Application.h:5,
from client/application/Application.cc:8:
client/application/Application.cc: In function ‘omnetpp::cObject* __factoryfunc_10()’:
client/application/Application.cc:10:15: error: cannot convert ‘Application*’ to ‘omnetpp::cModule*’ in initialization
Define_Module(Application);
^
client/application/Application.cc: In member function ‘void Application::initialize()’:
client/application/Application.cc:32:31: error: ‘par’ was not declared in this scope
int count = par("trace_count").longValue();
^
client/application/Application.cc: At global scope:
client/application/Application.cc:78:33: error: variable or field ‘handleMessage’ declared void
void Application::handleMessage(cMessage * message) {
^
client/application/Application.cc:78:33: error: ‘cMessage’ was not declared in this scope
client/application/Application.cc:78:33: note: suggested alternative:
In file included from /users/lwh1990/omnetpp-5.2.1/include/omnetpp/cchannel.h:21:0,
from /users/lwh1990/omnetpp-5.2.1/include/omnetpp.h:35,
from client/application/Application.h:5,
from client/application/Application.cc:8:
/users/lwh1990/omnetpp-5.2.1/include/omnetpp/cmessage.h:95:15: note: ‘omnetpp::cMessage’
class SIM_API cMessage : public cEvent
^
client/application/Application.cc:78:44: error: ‘message’ was not declared in this scope
void Application::handleMessage(cMessage * message) {
^
In file included from client/application/Application.cc:8:0:
client/application/Application.h:27:17: warning: inline function ‘void Application::generateInitialTraces()’ used but never defined [enabled by default]
inline void generateInitialTraces();
^
make: *** [out/gcc-release//client/application/Application.o] Error 1--------------------------------

Do u know how to fix these error?
Thank you!

I have solve the problem by change the version of OMNet++ to 4.2.