Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. How can fix linking errors?

How can fix linking errors?

Scheduled Pinned Locked Moved C / C++ / MFC
csharpc++visual-studiosysadminhelp
2 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    Armin Morattab
    wrote on last edited by
    #1

    Hi guys I’ve written a program to detect SPAM in VoIP calls. There are two state machines which control the state of the operation. One for clients and one for server. Anyway, the class for the client is ClientStateMachine which is declared below: (The program have been written in Microsoft Visual Studio 2005 C++) #ifndef CLIENTSTATEMACHINE_H #define CLIENTSTATEMACHINE_H #include "clientmsg.h" #include "sndrcvsockc.h" #include "blacklist.h" #include "whitelist.h" using namespace SPIT; namespace SPIT { class ClientMsg; class ClientStateMachine { public: ClientStateMachine(char = 'S'); class AllState{ public: virtual void onAbsZero(ClientStateMachine &u); virtual void onInvite(ClientStateMachine &u); virtual void onInviteRcv(ClientStateMachine &u); virtual void onInviteWl(ClientStateMachine &u); virtual void onInviteBl(ClientStateMachine &u); virtual void onInviteWait(ClientStateMachine &u); virtual void onInviteCh(ClientStateMachine &u); virtual void onCh(ClientStateMachine &u); virtual void onOk(ClientStateMachine &u); virtual void onEnd(ClientStateMachine &u); virtual void onBye(ClientStateMachine &u); }; friend AllState; class AbsoluteZero : public AllState{ public: void onAbsZero(ClientStateMachine &u); }; friend AbsoluteZero; class Idle : public AllState{ public: void onInvite(ClientStateMachine &u); void onInviteRcv(ClientStateMachine &u); void onInviteWl(ClientStateMachine &u); void onInviteBl(ClientStateMachine &u); void onInviteCh(ClientStateMachine &u); }; friend Idle; class Waiting : public AllState{ public: void onInviteWait(ClientStateMachine &u); void onCh(ClientStateMachine &u); void onOk(ClientStateMachine &u); void onEnd(ClientStateMachine &u); }; friend Waiting; class Established : public AllState{ public: void onBye(ClientStateMachine &u); }; friend Established; private: static AbsoluteZero ABSOLUTE_ZERO_STATE; static Idle IDLE_STATE; static Waiting WAITING_STATE; static Established ESTABLISHED_STATE; void nextState( AllState &mState); AllState *mCurrentState; // common methods void getUserInformationAndSetBuffer(ClientStateMachine &u); void setNextStateAndMsg(ClientStateMachine &u); void setMsgHeaderAndBudy(ClientStateMachine &u); void socketInitialize(ClientStateMachine &u); void socketFinalize(ClientStateMachine &u); SndRcvC mCli

    K 1 Reply Last reply
    0
    • A Armin Morattab

      Hi guys I’ve written a program to detect SPAM in VoIP calls. There are two state machines which control the state of the operation. One for clients and one for server. Anyway, the class for the client is ClientStateMachine which is declared below: (The program have been written in Microsoft Visual Studio 2005 C++) #ifndef CLIENTSTATEMACHINE_H #define CLIENTSTATEMACHINE_H #include "clientmsg.h" #include "sndrcvsockc.h" #include "blacklist.h" #include "whitelist.h" using namespace SPIT; namespace SPIT { class ClientMsg; class ClientStateMachine { public: ClientStateMachine(char = 'S'); class AllState{ public: virtual void onAbsZero(ClientStateMachine &u); virtual void onInvite(ClientStateMachine &u); virtual void onInviteRcv(ClientStateMachine &u); virtual void onInviteWl(ClientStateMachine &u); virtual void onInviteBl(ClientStateMachine &u); virtual void onInviteWait(ClientStateMachine &u); virtual void onInviteCh(ClientStateMachine &u); virtual void onCh(ClientStateMachine &u); virtual void onOk(ClientStateMachine &u); virtual void onEnd(ClientStateMachine &u); virtual void onBye(ClientStateMachine &u); }; friend AllState; class AbsoluteZero : public AllState{ public: void onAbsZero(ClientStateMachine &u); }; friend AbsoluteZero; class Idle : public AllState{ public: void onInvite(ClientStateMachine &u); void onInviteRcv(ClientStateMachine &u); void onInviteWl(ClientStateMachine &u); void onInviteBl(ClientStateMachine &u); void onInviteCh(ClientStateMachine &u); }; friend Idle; class Waiting : public AllState{ public: void onInviteWait(ClientStateMachine &u); void onCh(ClientStateMachine &u); void onOk(ClientStateMachine &u); void onEnd(ClientStateMachine &u); }; friend Waiting; class Established : public AllState{ public: void onBye(ClientStateMachine &u); }; friend Established; private: static AbsoluteZero ABSOLUTE_ZERO_STATE; static Idle IDLE_STATE; static Waiting WAITING_STATE; static Established ESTABLISHED_STATE; void nextState( AllState &mState); AllState *mCurrentState; // common methods void getUserInformationAndSetBuffer(ClientStateMachine &u); void setNextStateAndMsg(ClientStateMachine &u); void setMsgHeaderAndBudy(ClientStateMachine &u); void socketInitialize(ClientStateMachine &u); void socketFinalize(ClientStateMachine &u); SndRcvC mCli

      K Offline
      K Offline
      karle
      wrote on last edited by
      #2

      static members have to be inialised in cpp file. try: AbsoluteZero Established::ABSOLUTE_ZERO_STATE = AbsoluteZero(); Idle Established::IDLE_STATE = Idle(); Waiting Established::WAITING_STATE = Waiting(); Established Established::ESTABLISHED_STATE = Established();

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups