My guess is that either

Your compiler version is not the same as the one that compiled the caffe2 library, in particular differing in its name mangling (mapping C++ namespace+symbol+signature to a unique name in an address table)
The function you were using somewhere in your extension (caffe2::typeMetaDataInstance_preallocated) is not exported by the libraries you linked against.

What you can do is check whether you are getting the same error when compiling with the same compiler as was used to compile Caffe2.