Skip to content

Commit

Permalink
build: fix for #257
Browse files Browse the repository at this point in the history
INET is no longer using auto-import on Windows because it was generating
more than 65536 symbols causing crashes in dependent models. INET_API
macro should be used on all external INET API classes.
  • Loading branch information
rhornig committed May 24, 2017
1 parent 26f82d4 commit 8d64440
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 11 deletions.
8 changes: 4 additions & 4 deletions .cproject
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,14 @@
</builder>
<tool id="cdt.managedbuild.tool.gnu.archiver.base.1843986175" name="GCC Archiver" superClass="cdt.managedbuild.tool.gnu.archiver.base"/>
<tool id="cdt.managedbuild.tool.gnu.cpp.compiler.base.1544720771" name="GCC C++ Compiler" superClass="cdt.managedbuild.tool.gnu.cpp.compiler.base">
<option id="gnu.cpp.compiler.option.preprocessor.def.33891026" name="Defined symbols (-D)" superClass="gnu.cpp.compiler.option.preprocessor.def" useByScannerDiscovery="false" valueType="definedSymbols"/>
<option id="gnu.cpp.compiler.option.preprocessor.def.33891026" name="Defined symbols (-D)" superClass="gnu.cpp.compiler.option.preprocessor.def" useByScannerDiscovery="false"/>
<option id="gnu.cpp.compiler.option.include.paths.1304941279" name="Include paths (-I)" superClass="gnu.cpp.compiler.option.include.paths" useByScannerDiscovery="false" valueType="includePath">
<listOptionValue builtIn="false" value="../../src"/>
</option>
<inputType id="cdt.managedbuild.tool.gnu.cpp.compiler.input.1163034331" superClass="cdt.managedbuild.tool.gnu.cpp.compiler.input"/>
</tool>
<tool id="cdt.managedbuild.tool.gnu.c.compiler.base.892294620" name="GCC C Compiler" superClass="cdt.managedbuild.tool.gnu.c.compiler.base">
<option id="gnu.c.compiler.option.preprocessor.def.symbols.193803687" name="Defined symbols (-D)" superClass="gnu.c.compiler.option.preprocessor.def.symbols" useByScannerDiscovery="false" valueType="definedSymbols"/>
<option id="gnu.c.compiler.option.preprocessor.def.symbols.193803687" name="Defined symbols (-D)" superClass="gnu.c.compiler.option.preprocessor.def.symbols" useByScannerDiscovery="false"/>
<option id="gnu.c.compiler.option.include.paths.552444216" name="Include paths (-I)" superClass="gnu.c.compiler.option.include.paths" useByScannerDiscovery="false" valueType="includePath">
<listOptionValue builtIn="false" value="../../src"/>
</option>
Expand Down Expand Up @@ -84,14 +84,14 @@
<builder id="org.omnetpp.cdt.gnu.builder.release.1176677325" keepEnvironmentInBuildfile="false" managedBuildOn="true" name="OMNeT++ Make Builder (opp_makemake)" superClass="org.omnetpp.cdt.gnu.builder.release"/>
<tool id="cdt.managedbuild.tool.gnu.archiver.base.1643927787" name="GCC Archiver" superClass="cdt.managedbuild.tool.gnu.archiver.base"/>
<tool id="cdt.managedbuild.tool.gnu.cpp.compiler.base.1039888888" name="GCC C++ Compiler" superClass="cdt.managedbuild.tool.gnu.cpp.compiler.base">
<option id="gnu.cpp.compiler.option.preprocessor.def.655304152" name="Defined symbols (-D)" superClass="gnu.cpp.compiler.option.preprocessor.def" useByScannerDiscovery="false" valueType="definedSymbols"/>
<option id="gnu.cpp.compiler.option.preprocessor.def.655304152" name="Defined symbols (-D)" superClass="gnu.cpp.compiler.option.preprocessor.def" useByScannerDiscovery="false"/>
<option id="gnu.cpp.compiler.option.include.paths.1086707691" name="Include paths (-I)" superClass="gnu.cpp.compiler.option.include.paths" useByScannerDiscovery="false" valueType="includePath">
<listOptionValue builtIn="false" value="../../src"/>
</option>
<inputType id="cdt.managedbuild.tool.gnu.cpp.compiler.input.958073850" superClass="cdt.managedbuild.tool.gnu.cpp.compiler.input"/>
</tool>
<tool id="cdt.managedbuild.tool.gnu.c.compiler.base.419916163" name="GCC C Compiler" superClass="cdt.managedbuild.tool.gnu.c.compiler.base">
<option id="gnu.c.compiler.option.preprocessor.def.symbols.1241715501" name="Defined symbols (-D)" superClass="gnu.c.compiler.option.preprocessor.def.symbols" useByScannerDiscovery="false" valueType="definedSymbols"/>
<option id="gnu.c.compiler.option.preprocessor.def.symbols.1241715501" name="Defined symbols (-D)" superClass="gnu.c.compiler.option.preprocessor.def.symbols" useByScannerDiscovery="false"/>
<option id="gnu.c.compiler.option.include.paths.951413942" name="Include paths (-I)" superClass="gnu.c.compiler.option.include.paths" useByScannerDiscovery="false" valueType="includePath">
<listOptionValue builtIn="false" value="../../src"/>
</option>
Expand Down
2 changes: 1 addition & 1 deletion .oppbuildspec
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<buildspec version="4.0">
<dir path="." type="custom"/>
<dir makemake-options="--deep --make-so -o INET -O out --meta:export-include-path --meta:export-library --meta:use-exported-libs --meta:feature-cflags --meta:feature-ldflags" path="src" type="makemake"/>
<dir makemake-options="--make-so --deep -o INET -O out -pINET --meta:export-include-path --meta:export-library --meta:use-exported-libs --meta:feature-cflags --meta:feature-ldflags" path="src" type="makemake"/>
</buildspec>
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ cleanall: checkmakefiles
@rm -f src/Makefile $(FEATURES_H)
@cd tutorials && $(MAKE) clean && rm -rf doc/tutorials

MAKEMAKE_OPTIONS := -f --deep -o INET -O out -I.
MAKEMAKE_OPTIONS := -f --deep -o INET -O out -pINET -I.

makefiles: makefiles-so

Expand Down
10 changes: 7 additions & 3 deletions WHATSNEW
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@ minor enhancements. It requires OMNeT++ 5.1 or later.

Highlights in this release:

- On Windows, INET is no longer using the auto-import feature of the linker, because
it generated more than 65536 symbols. Dependent projects crashed because of this.
All INET APIs now should be prefixed with INET_API macro. (fixes #257)

- The IEEE 802.11 MAC model has been extended with several new components. The
implementation is entirely based on the standard IEEE 802.11™-2012 Part 11:
Wireless LAN Medium Access Control (MAC) and Physical Layer (PHY) Specifications.
Expand All @@ -17,14 +21,14 @@ Highlights in this release:
with new policies, features and algorithms within the MAC layer. Users can
easily replace individual components with their own implementations. Policies,
which most likely to be experimented with, are extracted into their own modules.

The new model has the following replaceable built-in policies:
- ACK policy
- RTS/CTS policy
- Originator and recipient block ACK agreement policies
- MSDU aggregation policy
- Fragmentation policy

The new model also separates the following components:
- Coordination functions
- Channel access methods
Expand All @@ -49,7 +53,7 @@ Highlights in this release:
- The power model has been extended with support for charge/current based models
as opposed to the existing energy/power based ones. A new energy management
component has also been added to separate monitoring and controlling of energy
consumers and generators from the rest of the model.
consumers and generators from the rest of the model.

- New visualizers has been added to display packet drops and link breaks, data
contained in interface tables, routes stored in routing tables, and transport
Expand Down
7 changes: 5 additions & 2 deletions src/makefrag
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
#
# on windows we have to link with the winsock2 library as it is no longer added
# on windows we have to link with the ws2_32 (winsock2) library as it is no longer added
# to the omnetpp system libraries by default (as of OMNeT++ 5.1)
#
ifeq ($(PLATFORM),win32.x86_64)
LIBS += -lwsock32
LIBS += -lws2_32
DEFINES += -DINET_EXPORT
ENABLE_AUTO_IMPORT=-Wl,--enable-auto-import
LDFLAGS := $(filter-out $(ENABLE_AUTO_IMPORT), $(LDFLAGS))
endif

#
Expand Down

0 comments on commit 8d64440

Please sign in to comment.