------- Comment #5 from gcc at dpinol dot com 2008-08-27 10:05 ------- (In reply to comment #4) > error: 'operator new' takes type 'size_t' ('long unsigned int') as first > parameter
I don't understand why you get this error > > What is the output of g++ -v ? > See below. It eventually fails when linking because ACE libraries are not added, but it compiles find Thanks $CXX -v main.ii Using built-in specs. Target: i686-pc-linux-gnu Configured with: ../gcc-4.3.1src/configure --prefix=/opt/gcc431 --exec-prefix=/opt/gcc431 Thread model: posix gcc version 4.3.1 (GCC) COLLECT_GCC_OPTIONS='-v' '-mtune=generic' /opt/gcc431/libexec/gcc/i686-pc-linux-gnu/4.3.1/cc1plus -fpreprocessed main.ii -quiet -dumpbase main. ii -mtune=generic -auxbase main -version -o /tmp/ccXxeyeY.s GNU C++ (GCC) version 4.3.1 (i686-pc-linux-gnu) compiled by GNU C version 4.3.1, GMP version 4.2.1, MPFR version 2.3.1. GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072 Compiler executable checksum: 2292e490ef57b0cdb59146a5820a2e88 COLLECT_GCC_OPTIONS='-v' '-mtune=generic' as -V -Qy -o /tmp/ccwWCoNY.o /tmp/ccXxeyeY.s GNU assembler version 2.17.50.0.5 (i586-suse-linux) using BFD version 2.17.50.0.5 20060927 (SUSE Linux ) COMPILER_PATH=/opt/gcc431/libexec/gcc/i686-pc-linux-gnu/4.3.1/:/opt/gcc431/libexec/gcc/i686-pc-linux-g nu/4.3.1/:/opt/gcc431/libexec/gcc/i686-pc-linux-gnu/:/opt/gcc431/lib/gcc/i686-pc-linux-gnu/4.3.1/:/opt /gcc431/lib/gcc/i686-pc-linux-gnu/ LIBRARY_PATH=/opt/gcc431/lib/gcc/i686-pc-linux-gnu/4.3.1/:/opt/gcc431/lib/gcc/i686-pc-linux-gnu/4.3.1/ ../../../:/lib/:/usr/lib/ COLLECT_GCC_OPTIONS='-v' '-mtune=generic' /opt/gcc431/libexec/gcc/i686-pc-linux-gnu/4.3.1/collect2 --eh-frame-hdr -m elf_i386 -dynamic-linker / lib/ld-linux.so.2 /usr/lib/crt1.o /usr/lib/crti.o /opt/gcc431/lib/gcc/i686-pc-linux-gnu/4.3.1/crtbegin .o -L/opt/gcc431/lib/gcc/i686-pc-linux-gnu/4.3.1 -L/opt/gcc431/lib/gcc/i686-pc-linux-gnu/4.3.1/../../. . /tmp/ccwWCoNY.o -lgcc --as-needed -lgcc_s --no-as-needed -lc -lgcc --as-needed -lgcc_s --no-as-neede d /opt/gcc431/lib/gcc/i686-pc-linux-gnu/4.3.1/crtend.o /usr/lib/crtn.o /tmp/ccwWCoNY.o: In function `CircularBuffer<ACE_Thread_Mutex>::CircularBuffer(ACE_Thread_Mutex*)': CircularBufferTest.cpp:(.text._ZN14CircularBufferI16ACE_Thread_MutexEC1EPS0_[CircularBuffer<ACE_Thread _Mutex>::CircularBuffer(ACE_Thread_Mutex*)]+0x10): undefined reference to `operator new[](unsigned int )' CircularBufferTest.cpp:(.text._ZN14CircularBufferI16ACE_Thread_MutexEC1EPS0_[CircularBuffer<ACE_Thread _Mutex>::CircularBuffer(ACE_Thread_Mutex*)]+0x50): undefined reference to `ACE_Thread_Mutex::ACE_Threa d_Mutex(char const*, pthread_mutexattr_t*)' CircularBufferTest.cpp:(.text._ZN14CircularBufferI16ACE_Thread_MutexEC1EPS0_[CircularBuffer<ACE_Thread _Mutex>::CircularBuffer(ACE_Thread_Mutex*)]+0x82): undefined reference to `__cxa_allocate_exception' CircularBufferTest.cpp:(.text._ZN14CircularBufferI16ACE_Thread_MutexEC1EPS0_[CircularBuffer<ACE_Thread _Mutex>::CircularBuffer(ACE_Thread_Mutex*)]+0x9c): undefined reference to `typeinfo for int' CircularBufferTest.cpp:(.text._ZN14CircularBufferI16ACE_Thread_MutexEC1EPS0_[CircularBuffer<ACE_Thread _Mutex>::CircularBuffer(ACE_Thread_Mutex*)]+0xa4): undefined reference to `__cxa_throw' CircularBufferTest.cpp:(.text._ZN14CircularBufferI16ACE_Thread_MutexEC1EPS0_[CircularBuffer<ACE_Thread _Mutex>::CircularBuffer(ACE_Thread_Mutex*)]+0xba): undefined reference to `ACE_Thread_Mutex::~ACE_Thre ad_Mutex()' /tmp/ccwWCoNY.o: In function `CircularBuffer<ACE_Thread_Mutex>::~CircularBuffer()': CircularBufferTest.cpp:(.text._ZN14CircularBufferI16ACE_Thread_MutexED1Ev[CircularBuffer<ACE_Thread_Mu tex>::~CircularBuffer()]+0x10): undefined reference to `ACE_Thread_Mutex::~ACE_Thread_Mutex()' /tmp/ccwWCoNY.o: In function `ACE_OS::thread_mutex_lock(pthread_mutex_t*)': CircularBufferTest.cpp:(.text._ZN6ACE_OS17thread_mutex_lockEP15pthread_mutex_t[ACE_OS::thread_mutex_lo ck(pthread_mutex_t*)]+0xd): undefined reference to `ACE_OS::mutex_lock(pthread_mutex_t*)' /tmp/ccwWCoNY.o: In function `ACE_OS::thread_mutex_unlock(pthread_mutex_t*)': CircularBufferTest.cpp:(.text._ZN6ACE_OS19thread_mutex_unlockEP15pthread_mutex_t[ACE_OS::thread_mutex_ unlock(pthread_mutex_t*)]+0xd): undefined reference to `ACE_OS::mutex_unlock(pthread_mutex_t*)' /tmp/ccwWCoNY.o:(.eh_frame+0x12): undefined reference to `__gxx_personality_v0' collect2: ld returned 1 exit status -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36833