./myNetLayerPosition.h:12:10: fatal error: 'BaseNetwLayer.h' file not found

39 views
Skip to first unread message

Domenico Daniele Celsa

unread,
Apr 8, 2014, 1:38:43 PM4/8/14
to omn...@googlegroups.com

Hi all,

i have a strange problem and i spoke about this in another post, but with another title, and no one could help me.

Maybe with this title someone else could help me:


When i use make command from my shell, apart some warnings, it gives me this error:


In file included from myNetLayerPosition.cpp:8:

./myNetLayerPosition.h:12:10: fatal error: 'BaseNetwLayer.h' file not found

#include <BaseNetwLayer.h>


in myNetLayerPosition.h i wrote #include <BaseNetwLayer.h> , cause i'm inheriting my network from BaseNetwLayer, but it gives this error, it looks like it doesn't recognize BaseNetwLayer.h ... i tried also with #include "BaseNetwLayer.h" ..

I checked in my mixim folder: mixim->src->base->modules and BaseNetwLayer.h exists of course..

And also i checked if mixim is set as a dependency for my project, and it is…


So does someone have some idea about how is possible this kind of problem..?

Every help would be really appreciated..!


Thanks in advance,

Daniele

Michael Kirsche

unread,
Apr 9, 2014, 5:53:41 AM4/9/14
to omn...@googlegroups.com
Setting dependencies in the IDE does not per se enable the correct indexing of files on the shell. Eclipse resolves inclusion of header files through its own index, on the shell you must make sure that your BaseNetwLayer.h is available in the Makefile.

You are compiling your project on the shell? Makefile is self-written or generated by opp_makemake or other tools?
Did you try to compile your project from the IDE?

Domenico Daniele Celsa

unread,
Apr 9, 2014, 11:45:14 AM4/9/14
to omn...@googlegroups.com
I use opp_makemake.
How can i be sure my BaseNetwLayer.h is available in the Makefile?
Probably it's not..

Michael Kirsche

unread,
Apr 9, 2014, 1:47:08 PM4/9/14
to omn...@googlegroups.com
You can check your makefile, take a look if all necessary folders are included, if the header files for the specific .cc file are mentioned in the "make depend" section.

Did you try to compile the project from the IDE with your project referencing MiXiM?

Domenico Daniele Celsa

unread,
Apr 13, 2014, 8:04:50 PM4/13/14
to omn...@googlegroups.com
I attach my makefile file, could u take a look?
 i don't understand which is the 'make depend' section u said.
And, if there is not the .h file that i need (BaseNetwLayer.h) , how can i add it? Manually, editing the makefile file? 

When you say to compile from the IDE, do you mean to build the project? Is it the same to use 'make' command from the shell?


Il giorno martedì 8 aprile 2014 20:38:43 UTC+3, Domenico Daniele Celsa ha scritto:
Makefile.rtf

Michael Kirsche

unread,
Apr 14, 2014, 4:12:36 AM4/14/14
to omn...@googlegroups.com
Yes compile/build it from the IDE.
It involves creation of the makefile, searching for dependencies and finally, creating the project.

And your makefile was just generated for your single project, no dependencies to MiXiM there...

So two ways to solve this:

1) Build your project in the IDE after you've enabled MiXiM under Properties -> Project References, the IDE will take care of dependencies/references.

2) Create a makefile where MiXiM and its source/header files are included. Read the Section 8.2.1 in the manual, parameters like -L and -I are what you're looking for.

Easier way for beginners is to use the IDE and let it take care of the makefile creation process.

Domenico Daniele Celsa

unread,
Apr 14, 2014, 6:29:34 PM4/14/14
to omn...@googlegroups.com
You are right! Building from Ide, Makefiles are different. Now in the dependencies there is the file i needed :)
Thank you!


Il giorno martedì 8 aprile 2014 20:38:43 UTC+3, Domenico Daniele Celsa ha scritto:

Domenico Daniele Celsa

unread,
Apr 14, 2014, 6:32:13 PM4/14/14
to omn...@googlegroups.com
I don't know why, before i was doing the same but there was a problem, the files _m.h and _m.cpp (for file.msg) weren't created and i solved it compiling with opp_makemake.
But now it works properly, i don't know.. but it's good :)


Il giorno martedì 8 aprile 2014 20:38:43 UTC+3, Domenico Daniele Celsa ha scritto:

khemiri.mo...@gmail.com

unread,
Apr 15, 2014, 2:47:01 PM4/15/14
to omn...@googlegroups.com
this problem is common and the resolution of it is quite simple

add variable MIXIM_INET and her value to 1
the place to add this value is

right click on your project then proriete then C/C++ general then paths and symbols then symbols after you click add and add the above value


if this not working there is another alternance which is:

Browse to MiXiM/src/base/messages
Run: opp_msgc -I ./ *.msg
Also Run the same in MiXiM/src/modules/messages
This should create the necessary files.
These files are removed when the project is cleaned(Re-built).


hope that will help you

thanks

Domenico Daniele Celsa

unread,
Apr 15, 2014, 7:26:24 PM4/15/14
to omn...@googlegroups.com
They don't work, both of them.. i don't know why.
Anw thanks for help! i'll go on compiling from IDE


Il giorno martedì 8 aprile 2014 20:38:43 UTC+3, Domenico Daniele Celsa ha scritto:
Reply all
Reply to author
Forward
0 new messages