OMNeT++/OMNEST Bug Tracker - OMNeT++
View Issue Details
0000410OMNeT++IDE / C++ developmentpublic2011-09-14 11:272011-09-14 11:32
andras 
andras 
normalminoralways
resolvedfixed 
4.2rc1 
4.2 
0000410: Dependencies for generated files are sometimes not included in the makefile
When building from the IDE, it is possible to get a build error like "error: include file Bar_m.h not found" while compiling a Foo.cc file, where Foo.cc actually includes a Bar.h, and Bar.h in turn includes the (generated) Bar_m.h file.

The Makefile should "know" (dependencies!) that for compiling Foo.cc, Bar_m.h is required, i.e. opp_msgc Bar.msg should be run beforehand.


This error is caused by a missing Bar_m.h line in Foo.obj's dependency list in the makefile.

See attached project that triggers the bug.
No tags attached.
zip a.zip (4,216) 2011-09-14 11:29
https://dev.omnetpp.org/bugs/file_download.php?file_id=77&type=bug
Issue History
2011-09-14 11:27andrasNew Issue
2011-09-14 11:29andrasFile Added: a.zip
2011-09-14 11:31andrasNote Added: 0000549
2011-09-14 11:32andrasNote Added: 0000550
2011-09-14 11:32andrasStatusnew => resolved
2011-09-14 11:32andrasFixed in Version => 4.2
2011-09-14 11:32andrasResolutionopen => fixed
2011-09-14 11:32andrasAssigned To => andras

Notes
(0000549)
andras   
2011-09-14 11:31   
Problem is in DependencyCache. Looks like a file that only #includes a nonexistent header file will not be included into CDT's index.
(0000550)
andras   
2011-09-14 11:32   
Looks like the indexManager.update() call in DependencyCache requires the IIndexManager.FORCE_INDEX_INCLUSION flag (in addition to IIndexManager.UPDATE_CHECK_TIMESTAMPS) to index files with unresolved #includes.