make[2]: Entering directory `/home/tsuna/svn/loki-lib/test/SmartPtr' g++ -Wall -Wold-style-cast -Wundef -Wsign-compare -Wconversion -Wpointer-arith -pedantic -g -O2 -I../../include -DNDEBUG -c -o main.o main.cpp main.cpp:53:2: warning: #warning is a GCC extension main.cpp:53:2: warning: #warning The warnings are by design: Check if SmartPtr can be used with a forward-reference. ../../include/loki/SmartPtr.h: In member function 'void Loki::DefaultSPStorage::Destroy() [with T = Thingy]': ../../include/loki/SmartPtr.h:1249: instantiated from 'Loki::SmartPtr::~SmartPtr() [with T = Thingy, OwnershipPolicy = Loki::RefCounted, ConversionPolicy = Loki::DisallowConversion, CheckingPolicy = Loki::AssertCheck, StoragePolicy = Loki::DefaultSPStorage, ConstnessPolicy = Loki::PropagateConst]' main.cpp:988: instantiated from here ../../include/loki/SmartPtr.h:193: warning: possible problem detected in invocation of delete operator: ../../include/loki/SmartPtr.h:193: warning: invalid use of undefined type 'struct Thingy' main.cpp:50: warning: forward declaration of 'struct Thingy' ../../include/loki/SmartPtr.h:193: note: neither the destructor nor the class-specific operator delete will be called, even if they are declared when the class is defined. g++ -o main main.o strong.o LockTest.o ../../lib/libloki.a -lpthread LockTest.o: In function `LockableTwoRefCounts': ../../include/loki/StrongPtr.h:633: undefined reference to `Loki::LockableTwoRefCounts::Increment(bool)' LockTest.o: In function `Loki::LockableTwoRefCounts::Release(bool)': ../../include/loki/StrongPtr.h:648: undefined reference to `Loki::LockableTwoRefCounts::Decrement(bool)' LockTest.o: In function `~StrongPtr': ../../include/loki/StrongPtr.h:951: undefined reference to `Loki::LockableTwoRefCounts::ZapPointer()' LockTest.o: In function `StrongPtr': ../../include/loki/StrongPtr.h:830: undefined reference to `Loki::LockableTwoRefCounts::LockableTwoRefCounts(void const*, bool)' LockTest.o: In function `Loki::LockableTwoRefCounts::Release(bool)': ../../include/loki/StrongPtr.h:648: undefined reference to `Loki::LockableTwoRefCounts::Decrement(bool)' LockTest.o: In function `~StrongPtr': ../../include/loki/StrongPtr.h:951: undefined reference to `Loki::LockableTwoRefCounts::ZapPointer()' LockTest.o: In function `Loki::LockableTwoRefCounts::Release(bool)': ../../include/loki/StrongPtr.h:648: undefined reference to `Loki::LockableTwoRefCounts::Decrement(bool)' LockTest.o: In function `~StrongPtr': ../../include/loki/StrongPtr.h:951: undefined reference to `Loki::LockableTwoRefCounts::ZapPointer()' LockTest.o: In function `StrongPtr': ../../include/loki/StrongPtr.h:830: undefined reference to `Loki::LockableTwoRefCounts::LockableTwoRefCounts(void const*, bool)' collect2: ld returned 1 exit status make[2]: *** [main] Error 1 make[2]: Leaving directory `/home/tsuna/svn/loki-lib/test/SmartPtr' $ g++ --version g++ (GCC) 4.1.2 20061115 (prerelease) (Debian 4.1.1-21) Copyright (C) 2006 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.