https://gcc.gnu.org/bugzilla/show_bug.cgi?id=54483
--- Comment #8 from Juisoo <usack at math dot fu-berlin.de> --- The described case seems to work in GCC 4.9.2 with the attached files and g++ -c -fpic testicle.cc -std=c++11 g++ -shared -o libtesticle.so testicle.o g++ -L/home/usack/entwicklung/tetris -Wall -o testicles main.cc -ltesticle -std=c++11 However, if I add another data member which is initialized with val by default, I still get the "undefined reference" error, see second attachment.