|
From: Stephen L. <sld...@so...> - 2008-02-12 19:30:35
|
Hi all, I ran into this when building pthreads-win32 with gcc 4.2.1-dw2. I got "undefined reference"s when building libpthreadGCE2. The functions involved are marked "inline", and I was able to build with "GCE_CFLAGS += -fkeep-inline-functions". In C++ inline functions is supposed to have default external linkage. I am wondering whether I am wrong in my supposition, this is a bug in pthreads, or a bug in g++? BTW, should I be worried about the multiple "warning: dereferencing type-punned pointer will break strict-aliasing rules" messages? Stephen $ make clean GCE ... g++ -D__CLEANUP_CXX -O3 -finline-functions -mthreads -shared -o pthreadGCE2.dll attr.o barrier.o cancel.o cleanup.o condvar.o create.o dll.o errno.o exit.o fork.o global.o misc.o mutex.o nonportable.o private.o rwlock.o sched.o semaphore.o signal.o spin.o sync.o tsd.o version.o -lwsock32 misc.o:misc.c:(.text+0x24f): undefined reference to `_ptw32_mcs_lock_acquire' misc.o:misc.c:(.text+0x266): undefined reference to `_ptw32_mcs_lock_release' ... -- Stephen Lee <sld...@so...> |