Menu

compile failed with 1.04

2002-07-18
2002-07-26
  • Nobody/Anonymous

    Marc,

    My ENV is RedHat 7.2 , g++ 2.96, glib 2.96
    But when I compiled from directory src, I got following errors:
    :
    :

    /usr/bin/g++ -c -g -pg -Wall -ftemplate-depth-30  -DUSE_NAMESPACES  -I../include allocator.cc -o allocator.o
    allocator.cc: In method `allocator_ns::Pool::Pool (const
    allocator_ns::Pool &)':
    <internal>:413: too many arguments to function `void *operator new
    (unsigned int)'
    allocator.cc:413: at this point in file
    allocator.cc: In method `allocator_ns::Pool
    &allocator_ns::Pool::operator= (const allocator_ns::Pool &)':
    <internal>:463: too many arguments to function `void *operator new
    (unsigned int)'
    allocator.cc:463: at this point in file
    allocator.cc: In method `void allocator_ns::Pool::grow ()':
    <internal>:690: too many arguments to function `void *operator new
    (unsigned int)'
    allocator.cc:690: at this point in file
    ../include/arena.h: In method `void arena::Arena<Memory_Type>::grow
    (int) [with Memory_Type = mem_space::shared]':
    ../include/arena.h:408:   instantiated from `arena::Arena<Memory_Type>::alloc (unsigned int) [with Memory_Type = mem_space::shared]'
    allocator.cc:411:   instantiated from here
    <internal>:190: too many arguments to function `void *operator new
    (unsigned int)'
    ../include/arena.h:190: at this point in file
    make: *** [allocator.o] Error 1

    It seems a stupid question, but could you help me figure out the problem?

    Thanks,

    Jim

     
    • Nobody/Anonymous

      add a header file in allocate.h
      #include <new>

      babido

       
    • Nobody/Anonymous

      sorry

      allocate.h -> allocator.cc

      babido

       
      • Nobody/Anonymous

        babido,

        Thanks, it works.

        Jim

         
    • Marc Bumble

      Marc Bumble - 2002-07-26

      Try upgrading to gcc-3.0.4

      Marc

       

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.