Skip to content

Commit

Permalink
build: added a missing INET_API macro causing a linker error on Windows
Browse files Browse the repository at this point in the history
Some header files had to be rearranged.
Note: Compat.h is meant to be included automatically by INETDefs.h
so it should not be included manually in any files (except Compat.cc)
  • Loading branch information
rhornig committed Aug 24, 2023
1 parent 2f5b080 commit 50f19cc
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
1 change: 1 addition & 0 deletions src/inet/common/Compat.cc
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
//


#include "inet/common/INETDefs.h"
#include "inet/common/Compat.h"

namespace inet {
Expand Down
4 changes: 2 additions & 2 deletions src/inet/common/Compat.h
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ typedef int sharedcounterhandle_t;
* This class encapsulates the "simulation-global variables" functionality which became
* part of the cSimulation class in OMNeT++ 7.0.
*/
class SharedDataManager : public omnetpp::cISimulationLifecycleListener
class INET_API SharedDataManager : public omnetpp::cISimulationLifecycleListener
{
private:
struct SharedDataHandles {
Expand Down Expand Up @@ -186,7 +186,7 @@ T& SharedDataManager::getSharedVariable(int handle, Args&&... args)
* Supporting class for EXECUTE_PRE_NETWORK_SETUP() / EXECUTE_POST_NETWORK_DELETE(),
* which didn't exist prior to OMNeT++ 7.0.
*/
class CodeFragment
class INET_API CodeFragment
{
private:
omnetpp::SimulationLifecycleEventType lifecycleEvent;
Expand Down
3 changes: 1 addition & 2 deletions src/inet/common/INETDefs.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,6 @@
// General definitions.
//

#include "inet/common/Compat.h"

namespace inet {
using namespace omnetpp;
} // namespace inet
Expand All @@ -46,6 +44,7 @@ using namespace omnetpp;
#define INET_API
#endif // if defined(INET_EXPORT)

#include "inet/common/Compat.h"
#include "inet/common/InitStages.h"

// main namespace of INET framework
Expand Down
2 changes: 1 addition & 1 deletion src/inet/visualizer/base/QueueVisualizerBase.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
#ifndef __INET_QUEUEVISUALIZERBASE_H
#define __INET_QUEUEVISUALIZERBASE_H

#include "inet/common/Compat.h"
#include "inet/common/INETDefs.h"
#include "inet/queueing/contract/IPacketQueue.h"
#include "inet/visualizer/base/VisualizerBase.h"
#include "inet/visualizer/util/Placement.h"
Expand Down

0 comments on commit 50f19cc

Please sign in to comment.