Migration from 4.6 to 5.1 with building errors

35 views
Skip to first unread message

James Lin

unread,
Aug 3, 2017, 11:17:24 PM8/3/17
to OMNeT++ Users

I tried to migrate a project based on omnet++ 4.6 (in which it works well) to omnet++ 5.1, but come with a building error: "ib_m.h is not found". In fact, the file "ib_m.h" stays in a subdirectory of the project. What is wrong with it?
Is OMNeT++ hard in migration between different versions? Thanks.

Michael Kirsche

unread,
Aug 4, 2017, 4:01:20 AM8/4/17
to OMNeT++ Users
The ib_m.h is (same as the ib_m.cc file) a message compiler generated file from the according ib.msg file.
It will always be compiled in the directory where the ib.msg (and whatever msg file you have) resides.
In newer OMNeT versions (5.0 and following), projects like INET use paths for the inclusion of header files. You should check the source code where the ib_m.h is included and adjust the inclusion path accordingly. Check the INET project to see how includes of message classes and other headers are handled there.

James Lin

unread,
Aug 7, 2017, 3:19:56 AM8/7/17
to OMNeT++ Users
Thanks Michael.
I added the directory which includes ib_m.h file to the inclusion path by setting "properties for the project-->Paths and Symbols-->includes", but still with the error "application/app.cc:33:18: fatal error: ib_m.h: No such file or directory". What should i do? 

在 2017年8月4日星期五 UTC+8下午4:01:20,Michael Kirsche写道:

Michael Kirsche

unread,
Aug 7, 2017, 3:43:22 PM8/7/17
to OMNeT++ Users
You need to add the path to the actual include statement in your source code!
Like I wrote, newer OMNeT and INET versions use complete include paths, so change the include statement in app.cc.

James Lin

unread,
Aug 8, 2017, 11:21:22 PM8/8/17
to OMNeT++ Users
It works. Thank you Michael!

在 2017年8月8日星期二 UTC+8上午3:43:22,Michael Kirsche写道:
Reply all
Reply to author
Forward
0 new messages