Anonymous | Login | 2022-05-25 11:02 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 | ||||
0000297 | OMNeT++ | IDE / C++ development | public | 2011-05-11 07:02 | 2011-05-11 07:04 | ||||
Reporter | andras | ||||||||
Assigned To | andras | ||||||||
Priority | normal | Severity | minor | Reproducibility | have not tried | ||||
Status | resolved | Resolution | fixed | ||||||
Platform | OS | OS Version | |||||||
Product Version | 4.1 | ||||||||
Target Version | Fixed in Version | ||||||||
Summary | 0000297: Build: inclusion of _m.h files may fail due to .msg file not translated to C++ in time | ||||||||
Description | Sometimes there are spurious "cannot include xxx_m.h: no such file or directory" errors during build, while the corresponding .msg file exists. The Makefile somehow doesn't invoke opp_msgc in time for that .msg file. Analysis reveals that this happens when the .cc file includes xxx_m.h via a header file (say foo.h) which is marked as "ambiguous include" in the IDE. (The warning for the #include "foo.h" line is: "Makefile autodeps: ambiguous include (more than one matching file found)", meaning there are more than one foo.h files in the project.) Looking at the Makefile, the dependencies for the .cc file DON'T contain foo.h (or xxx_m.h), which is apparently why make doesn't know that xxx_m.h will be needed for compiling the .cc file, and doesn't invoke opp_msgc. Thus, the root cause of the problem seems to be that the makefile generator leaves out ambiguous includes from the dependencies. Instead of leaving out foo.h, it should play safe and list both (all) foo.h files in the project as the dependency of the .cc file. | ||||||||
Tags | No tags attached. | ||||||||
Attached Files | |||||||||
![]() |
|
(0000436) andras (administrator) 2011-05-11 07:04 |
Events go like this: - #include "TED.h" is ambiguous in some Foo.cc - thus, files that TED.h includes are not counted as dependency for Foo.cc - so, if even TED.h includes IntServ_m.h, IntServ_m.h is NOT listed in Foo.cc's dependency list in the generated Makefile - therefore, the Makefile doesn't ensure that IntServ.msg is processed with opp_msgc before Foo.cc is compiled - result: IntServ_m.h is missing when Foo.cc is compiled --> ERROR |
(0000437) andras (administrator) 2011-05-11 07:04 |
Fixed. |
![]() |
|||
Date Modified | Username | Field | Change |
2011-05-11 07:02 | andras | New Issue | |
2011-05-11 07:04 | andras | Note Added: 0000436 | |
2011-05-11 07:04 | andras | Note Added: 0000437 | |
2011-05-11 07:04 | andras | Status | new => resolved |
2011-05-11 07:04 | andras | Fixed in Version | => 4.2b3 |
2011-05-11 07:04 | andras | Resolution | open => fixed |
2011-05-11 07:04 | andras | Assigned To | => andras |
Copyright © 2000 - 2022 MantisBT Team |