Anonymous | Login | 2022-05-27 19:44 UTC | ![]() |
My View | View Issues | Change Log | Roadmap |
View Issue Details [ Jump to Notes ] | [ Issue History ] [ Print ] | ||||||||
ID | Project | Category | View Status | Date Submitted | Last Update | ||||
0000984 | OMNeT++ | simulation kernel | public | 2017-01-11 20:22 | 2017-02-01 15:27 | ||||
Reporter | till | ||||||||
Assigned To | andras | ||||||||
Priority | high | Severity | block | Reproducibility | always | ||||
Status | resolved | Resolution | fixed | ||||||
Platform | x86-64 | OS | macOS | OS Version | 10.12 | ||||
Product Version | 5.1pre2 | ||||||||
Target Version | Fixed in Version | 5.1pre3 | |||||||
Summary | 0000984: error "#include <platdep/sockets.h> must precede <omnetpp.h> (and <platdep/timeutil.h> if present)" not possible in msg-files | ||||||||
Description | I get an error with OMNeT++ 5.1preview2: error "#include <platdep/sockets.h> must precede <omnetpp.h> (and <platdep/timeutil.h> if present)" Situation is the following: I have a message file: packet CTFrame extends EthernetIIFrame therefore the message file contains: cplusplus {{ //INET #include "inet/linklayer/ethernet/EtherFrame_m.h" }} In the generated code i have #include <omnetpp.h> in top and below: // cplusplus {{ //INET #include "inet/linklayer/ethernet/EtherFrame_m.h" // }} But EtherFrame_m.h includes Ethernet.h that itself includes INETDefs.h that includes precompiled.h that includes sockets.h that defines the error. I have no idea how to fix that, because the code is generated by the msg compiler. I cannot change the order of the includes! | ||||||||
Tags | No tags attached. | ||||||||
Attached Files | |||||||||
![]() |
|
(0001276) rhornig (administrator) 2017-01-27 14:25 |
This is indeed bad. The proper solution will be: - remove the ordering constraint between omnetpp.h and platdep/sockets.h - remove platdep/sockets.h from precompiled.h in INET This solution will work only with OMNET 5.1 pre3+ and INET 3.5 |
(0001277) andras (administrator) 2017-02-01 11:10 |
Solution: in platdep/timeutil.h, don't define timeval ourself, just pull in <winsock2.h> (forget the obsolete <winsock.h>, it should never be used). In platdep/sockets.h, also include <winsock2.h> unconditionally, and remove the #error directive. |
![]() |
|||
Date Modified | Username | Field | Change |
2017-01-11 20:22 | till | New Issue | |
2017-01-27 14:25 | rhornig | Note Added: 0001276 | |
2017-02-01 11:10 | andras | Note Added: 0001277 | |
2017-02-01 11:10 | andras | Status | new => resolved |
2017-02-01 11:10 | andras | Fixed in Version | => 5.1pre3 |
2017-02-01 11:10 | andras | Resolution | open => fixed |
2017-02-01 11:10 | andras | Assigned To | => andras |
Copyright © 2000 - 2022 MantisBT Team |