Bug 201

Summary: header files in NS-3 conflicting with those in external library
Product: ns-3 Reporter: Jahanzeb Farooq <jahanzeb.farooq>
Component: networkAssignee: Mathieu Lacage <mathieu.lacage>
Status: RESOLVED FIXED    
Severity: major CC: mathieu.lacage, ns-bugs
Priority: P3 Keywords: api
Version: pre-release   
Hardware: All   
OS: All   

Description Jahanzeb Farooq 2008-06-04 06:27:30 UTC
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 UTC
This seems pretty obvious: please, provide a patch.
Comment 2 Mathieu Lacage 2008-10-16 06:53:17 UTC
changeset 5ab2feb083a0