unix - gcc compilation error at /usr/include/net/if.h in C++ -


im using gcc version 4.4.1, xmake version 2.17.3. following error when compiling.

`

in file included /rtcigp/run/pd/ace/6.0.7_x86/64opt/include/ace/os_include/net/os_if.h:28, /rtcigp/run/pd/ace/6.0.7_x86/64opt/include/ace/os_ns_sys_socket.h:29, /rtcigp/run/pd/ace/6.0.7_x86/64opt/include/ace/ace.inl:8, /rtcigp/run/pd/ace/6.0.7_x86/64opt/include/ace/ace.h:886, /rtcigp/run/pd/ace/6.0.7_x86/64opt/include/ace/string_base.cpp:6, /rtcigp/run/pd/ace/6.0.7_x86/64opt/include/ace/string_base.h:882, /rtcigp/run/pd/ace/6.0.7_x86/64opt/include/ace/sstring.h:23, /rtcigp/run/pd/ace/6.0.7_x86/64opt/include/tao/cdr.h:61, /rtcigp/run/pd/ace/6.0.7_x86/64opt/include/tao/ub_string_argument_t.cpp:7, /rtcigp/run/pd/ace/6.0.7_x86/64opt/include/tao/ub_string_argument_t.h:177, /rtcigp/run/pd/ace/6.0.7_x86/64opt/include/tao/any_insert_policy_t.h:18, /rtcigp/run/pd/ace/6.0.7_x86/64opt/include/tao/basic_arguments.h:25, /rtcigp/run/pd/ace/6.0.7_x86/64opt/include/tao/iopc.h:52, /rtcigp/run/pd/ace/6.0.7_x86/64opt/include/tao/object.h:23, /rtcigp/run/pd/ace/6.0.7_x86/64opt/include/tao/corba.h:39, ../../include/processors/chat/ms_chat.h:18, ../../include/processors/chat/forging.h:9, /home/akilis/ktph/leaf/src/ktph/processors/chat/src/forging.cpp:6: /usr/include/net/if.h: @ global scope: /usr/include/net/if.h:99: error: template argument required 'struct map' 

`

i found solution problem. included <net/if.h> before other includes suggested. doesnt solve problem. still same error.

my ../../include/processors/chat/forging.h:9 looks below

`

 9  #include "processors/chat/ms_chat.h" 10  #include <string> 11  // chat 12  #include <vector> 13  #include <gtcpp/mtlock.h> 14  #include <map> 15  // 16  #include "env/genericmapper.h" 17 18  using namespace std; 

`

then /rtcigp/run/pd/ace/6.0.7_x86/64opt/include/ace/os_include/net/os_if.h:28 looks follows

`

27  #if !defined (ace_lacks_net_if_h) 28  #  include /**/ <net/if.h> 29  #  if defined (ace_has_net_if_dl_h) 30  #    include /**/ <net/if_dl.h> 31  #  endif /* ace_has_net_if_dl_h */ 

`

the peculiar thing code compiles without fuss in solaris cc. problem pops out when compile gcc.

am missing here? should there changes made in code when changing gcc cc. or bug in gcc compiler has been fixed in later versions?


Comments

Popular posts from this blog

javascript - AngularJS custom datepicker directive -

javascript - jQuery date picker - Disable dates after the selection from the first date picker -