Papierkorb / bindgen

Binding and wrapper generator for C/C++ libraries
GNU General Public License v3.0
179 stars 18 forks source link

Undefined reference to GC_throw_bad_alloc() #77

Open HertzDevil opened 4 years ago

HertzDevil commented 4 years ago

Today I started receiving this error in Bindgen after performing a system update which bumps my libgc's version to 8.0.4:

/usr/bin/ld: ... /spec/integration/tmp/../tmp/instance_properties.o: in function `operator new(unsigned long, GCPlacement, void (*)(void*, void*), void*)':
instance_properties.cpp:(.text._Znwm11GCPlacementPFvPvS0_ES0_[_Znwm11GCPlacementPFvPvS0_ES0_]+0xc6): undefined reference to `GC_throw_bad_alloc()'
collect2: error: ld returned 1 exit status

This is due to https://github.com/ivmai/bdwgc/issues/268#issuecomment-471212628. According to that issue there are 3 solutions: