HowTo: Adding libxml2 include paths and symbols in Eclipse

1,479 views
Skip to first unread message

Nicholas Loulloudes

unread,
Jul 19, 2011, 7:20:32 AM7/19/11
to ns-3-...@googlegroups.com
Hi all, 

I just wanted to contribute to the community how to add the LIBXML2 include paths and symbols for NS3, when developing under Eclipse.

This tips are for Ubuntu Linux distributions. The paths might be different for other distributions.

In a terminal write the following:
  1. pkg-config --cflags libxml-2.0
  2. Copy&paste the output. (On my machine this was: -I/usr/include/libxml2 )

To add the LIBXML2 include paths and symbols in Eclipse:
  1. Right-click your CDT project and select Properties.
  2. Expand C/C++ General and select Paths and Symbols.
  3. Select GNU C++ under Languages
  4. Click Add to define new element
  5. Write in the Directory field what was the output of the pkg-config command without the -I prefix i.e: /usr/include/libxml2)
  6. Re-build the ns-3 project.
  7. That's it!
That will sort-out and un-resolved include error messages you might get.

Best regards,
Nicholas.

However, I see that Eclipse resports 


John Abraham

unread,
Jul 19, 2011, 10:00:56 AM7/19/11
to ns-3-users
Thanks added to https://www.nsnam.org/wiki/index.php/HOWTO_configure_eclipse_with_ns-3

On Jul 19, 7:20 am, Nicholas Loulloudes <loulloude...@gmail.com>
wrote:
> Hi all,
>
> I just wanted to contribute to the community how to add the LIBXML2 include
> paths and symbols for NS3, when developing under Eclipse.
>
> This tips are for Ubuntu Linux distributions. The paths might be different
> for other distributions.
>
> In a terminal write the following:
>
>    1. *pkg-config --cflags libxml-2.0*
>    2. Copy&paste the output. (On my machine this was: *
>    -I/usr/include/libxml2* )
>
> To add the LIBXML2 include paths and symbols in Eclipse:
>
>    1. Right-click your CDT project and select *Properties*.
>    2. Expand *C/C++ General* and select *Paths and Symbols*.
>    3. Select *GNU C++* under Languages
>    4. Click *Add* to define new element
>    5. Write in the Directory field what was the output of the pkg-config
>    command without the -I prefix i.e: */usr/include/libxml2*)
>    6. Re-build the ns-3 project.
>    7. That's it!
Reply all
Reply to author
Forward
0 new messages