Bug 201 - header files in NS-3 conflicting with those in external library
header files in NS-3 conflicting with those in external library
Status: RESOLVED FIXED
Product: ns-3
Classification: Unclassified
Component: network
pre-release
All All
: P3 major
Assigned To: Mathieu Lacage
: api
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2008-06-04 06:27 EDT by Jahanzeb Farooq
Modified: 2008-10-16 06:53 EDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jahanzeb Farooq 2008-06-04 06:27:30 EDT
I am working on WiMAX module for NS-3. I am using an external library IT++ for OFDM PHY layer operations. I identified the problem when I tried to compile after including the library. Both NS-3 and IT++ library have same named header files channel.h and config.h. Therefore the pre-processor macros (#ifndef, #define) in channel.h and config.h of NS-3 prevent the same named files from IT++ library from being included for compilation. 

As a temporary solution I changed the pre-processor macro definitions in NS-3 files by adding NS3_ in beginning, i.e., I changed 

#ifndef CHANNEL_H
#define CHANNEL_H

to 

#ifndef NS3_CHANNEL_H
#define NS3_CHANNEL_H

and similarly in config.h file.

However there is need to solve this problem permanently since it is not very unlikely that NS-3 developers use some external libraries which have header files conflicting with those of NS-3.

Thanks.
Comment 1 Mathieu Lacage 2008-06-06 12:18:51 EDT
This seems pretty obvious: please, provide a patch.
Comment 2 Mathieu Lacage 2008-10-16 06:53:17 EDT
changeset 5ab2feb083a0