-2

I have got the following errors in link phase

error LNK2028: unresolved token (0A005083) "public: virtual __cdecl pcl::io::IOException::~IOException(void)" (??1IOException@io@pcl@@$$FUEAA@XZ) referenced in function "public: virtual void * __cdecl pcl::io::IOException::`vector deleting destructor'(unsigned int)" (??_EIOException@io@pcl@@$$FUEAAPEAXI@Z)

error LNK2001: unresolved external symbol "public: virtual char const * __cdecl pcl::io::IOException::what(void)const " (?what@IOException@io@pcl@@UEBAPEBDXZ)

error LNK2019: unresolved external symbol "public: virtual __cdecl pcl::io::IOException::~IOException(void)" (??1IOException@io@pcl@@$$FUEAA@XZ) referenced in function "public: virtual void * __cdecl pcl::io::IOException::`vector deleting destructor'(unsigned int)" (??_EIOException@io@pcl@@$$FUEAAPEAXI@Z)

Any ideas why that is happening to me?

L Y E S - C H I O U K H
  • 4,765
  • 8
  • 40
  • 57
Ahmad Mhaish
  • 111
  • 1
  • 8

1 Answers1

1

The question is a little to explicit or on the one hand and on the other hand to general and that might be the reason you got not yet a answer.

The general answer. Somewhere in your headers is a definition of those function are those objects referenced. But the implementation is not provided. This is basic C++ knowledge. - This can happen if you miss to link static build-libraries.

Now it get very explicit: Why here? I cannot answer that for point-clound-library but I recently had a similar problem when I tried to use my a static compile lib which was compiled with Visual Studio 2017 before the update of december 2017 with the new version after december 2017, and our build server wasn't update yet, but one my working machine it was.

How to trial and error to the next step: If it was working before: Recompile every dependent library with your current compiler environment.

Sorry this is too long for a comment. Hope that helps and you can solve it.

JackGrinningCat
  • 480
  • 4
  • 9
  • I understand I will check the code again, thank you a lot for your help. The strange thing is that I am using a wrapper that just call one method from the C++ library so couldn't understand why the error appeared. And the code was just working fine until I move it to VS 2017. However, sorry for that non-clear question I though its a common error in PCL lib maybe because of x64 or something else. – Ahmad Mhaish Mar 05 '18 at 15:49