Bug 246

Summary: Compile errors with gcc
Product: ns-3 Reporter: UliH <uh_de>
Component: build systemAssignee: ns-bugs <ns-bugs>
Status: RESOLVED DUPLICATE    
Severity: critical Keywords: bug
Priority: P3    
Version: pre-release   
Hardware: PC   
OS: Linux   

Description UliH 2008-06-30 17:00:34 UTC
ns-3.1 (release) cannot compile due to some missing #include. This probably occurs only with very recent versions of gcc. Mine is:

gcc version 4.3.1 20080507 (prerelease) [gcc-4_3-branch revision 135036] (SUSE Linux)

Error message:
[187/459] cxx: src/core/callback-test.cc -> build/debug/src/core/callback-test_1.o
In file included from ../src/core/callback-test.cc:22:
../src/core/callback.h: In member function ‘void ns3::Callback<R, T1, T2, T3, T4, T5, T6>::DoAssign(ns3::Ptr<const ns3::CallbackImplBase>)’:
../src/core/callback.h:412: error: must #include <typeinfo> before using typeid
../src/core/callback.h:412: error: must #include <typeinfo> before using typeid
Build failed
 -> task failed (err #129): [bld:///home/herberg/ns3/ns-3.1/src/core/callback-test_1.o]

The problem can be solved by simply adding all includes that are missing .
Comment 1 Mathieu Lacage 2008-06-30 17:06:25 UTC
see duplicate bug 245 for a patch.

*** This bug has been marked as a duplicate of bug 245 ***
Comment 2 UliH 2008-07-01 03:21:15 UTC
(In reply to comment #1)
> see duplicate bug 245 for a patch.
> 
> *** This bug has been marked as a duplicate of bug 245 ***
> 

Thanks! That solves it.