problem with include directories

1,193 views
Skip to first unread message

lrleon

unread,
Nov 14, 2010, 12:35:41 PM11/14/10
to omnetpp
Hi

I'm trying to migrate a sim model from omnet++ 3.x to 4.1.

I followed the instructions of migration guide in

http://omnetpp.org/doc/omnetpp41/migration/migration.html

Currently, I'm in the step 5: doing the migration through of IDE (I
executed successfully the migration scripts migrate* ...). I have
created a new omnet++ project with src and simulation directories. I
have put my sources in src directory.

The current problem: when I try to build the project the c++ compiler
does not find some external header files. The message is:

error: my_header.H: No such file or directory

Seeing the console messages, I noted that the compiler does not know
the path to my headers. So, I opened Project/Properties. Expand
Configuration Properties/C++/General and I put the path "/path-to-
my_header".

However, when I build again, the compiler does not see the directory;
that is, the gcc call does not contains the -I/path-to-my_header.
Obviously, for me, this is the reason because the compiler does not
find the header: it is not instructed for searching in the directory /
path-to-my_header.

If the IDE is configured for searching in /path-to-my_header, why it
does not generate the Makefile containing the -I/path-to-my_header?

I will appreciate your comments and I apologize if my question is
already discussed before in this forum.

Sincerely,

Leandro León

Rudolf Hornig

unread,
Nov 14, 2010, 5:08:59 PM11/14/10
to omn...@googlegroups.com
On Sun, Nov 14, 2010 at 6:35 PM, lrleon <leandro...@gmail.com> wrote:
Hi

I'm trying to migrate a sim model from omnet++ 3.x to 4.1.

I followed the instructions of migration guide in

 http://omnetpp.org/doc/omnetpp41/migration/migration.html

Currently, I'm in the step 5: doing the migration through of IDE (I
executed successfully the migration scripts migrate* ...). I have
created a new omnet++ project with src and simulation directories. I
have put my sources in src directory.

The current problem: when I try to build the project the c++ compiler
does not find some external header files. The message is:

 error: my_header.H: No such file or directory

Seeing the console messages, I noted that the compiler does not know
the path to my headers. So, I opened Project/Properties. Expand
Configuration Properties/C++/General and I put the path "/path-to-
my_header".

I'm not exactly seeing where you set the include, but you have to set the include path on the 
"Path & Symbols" page in the Project properties dialog.

Rudolf
 

However, when I build again, the compiler does not see the directory;
that is, the gcc call does not contains the -I/path-to-my_header.
Obviously, for me, this is the reason because the compiler does not
find the header: it is not instructed for searching in the directory /
path-to-my_header.

If the IDE is configured for searching in /path-to-my_header, why it
does not generate the Makefile containing the -I/path-to-my_header?

I will appreciate your comments and I apologize if my question is
already discussed before in this forum.

Sincerely,

Leandro León

--
You received this message because you are subscribed to the Google Groups "omnetpp" group.
To post to this group, send email to omn...@googlegroups.com.
To unsubscribe from this group, send email to omnetpp+u...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/omnetpp?hl=en.


Leandro Rabindranath León

unread,
Nov 14, 2010, 6:17:29 PM11/14/10
to omn...@googlegroups.com
Hi Rudolf and friends


> >I'm not exactly seeing where you set the include, but you have to
> >set the include path on the
> >"Path & Symbols" page in the Project properties dialog.


That is exactly the place where I put the include
directory. Currently, I open that dialog and it shows the desired
path (says us /path-to-my-header) for assembler, c and c++
languages. However, as I already said it, the project building
(and the generated makefile) does not put the directory.

I imagine that this problem is a silly thing; perhaps, an eclipse
setting (in fact, that is the first time that I use eclipse). But
I believe that I tried that what my experience with others ide's
says me.

I have seen some threads in this group dealing with this problem,
by example, "Unable to include INET headers" and "how to include
STL containers?" and they suggest the same that you.

However, I think that my problem is that the directory is
correctly specified in the project properties but, by a reason
that I ignore, the IDE does not put it in the makefile (or
another config file).

Again, I express my gratitude in advance.

Regards,

Leandro


> >
> >Rudolf
> >
> >> However, when I build again, the compiler does not see the
> >> directory; that is, the gcc call does not contains the
> >> -I/path-to-my_header. Obviously, for me, this is the reason
> >> because the compiler does not find the header: it is not
> >> instructed for searching in the directory / path-to-my_header.
> >>
> >> If the IDE is configured for searching in /path-to-my_header, why
> >> it does not generate the Makefile containing the
> >> -I/path-to-my_header?
> >>
> >> I will appreciate your comments and I apologize if my question is
> >> already discussed before in this forum.
> >>
> >> Sincerely,
> >>
> >> Leandro León
> >>
> >> --
> >> You received this message because you are subscribed to the Google
> >> Groups "omnetpp" group.
> >> To post to this group, send email to omn...@googlegroups.com.
> >> To unsubscribe from this group, send email to

> >> omnetpp+u...@googlegroups.com<omnetpp%2Bunsubscribe@googleg
> >> roups.com> .


> >> For more options, visit this group at

> >> http://groups.google.com/group/omnetpp?hl=en.TEXT

--------
Leandro Rabindranath León
(Programador)

suliman Fati

unread,
Nov 15, 2010, 9:01:37 AM11/15/10
to omnetpp
hi

check if the file my_header.h already exist in your folder. if exist
add its path to c or C++ paths and symbols

regards


On Nov 15, 6:08 am, Rudolf Hornig <rudolf.hor...@gmail.com> wrote:
> > omnetpp+u...@googlegroups.com<omnetpp%2Bunsu...@googlegroups.com >
> > .

vand...@gmail.com

unread,
Jul 13, 2017, 6:27:47 AM7/13/17
to OMNeT++ Users, leandro...@gmail.com
Project -> Properties -> Path and Symbols -> Source Location -> Add Folder .. then add your folder with source code and header files ..

воскресенье, 14 ноября 2010 г., 17:35:41 UTC пользователь lrleon написал:

Alvin D'Mello

unread,
Feb 14, 2018, 2:47:32 AM2/14/18
to OMNeT++ Users
I had the same problem. Here is how it was resolved.

In your project, right click on src folder and select properties.
src -> OMNet++ -> Makemake -> Compile.

Here select all check boxes.

Apply and close.

You will need to recompile.
Reply all
Reply to author
Forward
0 new messages