undefined reference to `vtkResourceParser::vtkParserContext::ReadLine
vtk master fails to link since this week, in vtkIOPLY module:
[ 42%] Linking CXX shared library ../../bin/libvtkIOPLY-9.2.dll
/usr/lib/gcc/x86_64-w64-mingw32/12.2.0/../../../../x86_64-w64-mingw32/bin/ld: CMakeFiles/IOPLY.dir/objects.a(vtkPLY.cxx.obj):vtkPLY.cxx:(.text+0x3151): undefined reference to `vtkResourceParser::vtkParserContext::ReadLine(std::function<void (char const*, unsigned long long)> const&, unsigned long long)'
/usr/lib/gcc/x86_64-w64-mingw32/12.2.0/../../../../x86_64-w64-mingw32/bin/ld: CMakeFiles/IOPLY.dir/objects.a(vtkPLY.cxx.obj):vtkPLY.cxx:(.text+0x33a9): undefined reference to `vtkResourceParser::vtkParserContext::SetStream(vtkResourceStream*)'
/usr/lib/gcc/x86_64-w64-mingw32/12.2.0/../../../../x86_64-w64-mingw32/bin/ld: CMakeFiles/IOPLY.dir/objects.a(vtkPLY.cxx.obj):vtkPLY.cxx:(.text+0x57cb): undefined reference to `vtkResourceParser::vtkParserContext::Read(char*, unsigned long long)'
/usr/lib/gcc/x86_64-w64-mingw32/12.2.0/../../../../x86_64-w64-mingw32/bin/ld: CMakeFiles/IOPLY.dir/objects.a(vtkPLY.cxx.obj):vtkPLY.cxx:(.text+0x581e): undefined reference to `vtkResourceParser::vtkParserContext::Read(char*, unsigned long long)'
/usr/lib/gcc/x86_64-w64-mingw32/12.2.0/../../../../x86_64-w64-mingw32/bin/ld: CMakeFiles/IOPLY.dir/objects.a(vtkPLY.cxx.obj):vtkPLY.cxx:(.text+0x5990): undefined reference to `vtkResourceParser::vtkParserContext::Read(char*, unsigned long long)'
/usr/lib/gcc/x86_64-w64-mingw32/12.2.0/../../../../x86_64-w64-mingw32/bin/ld: CMakeFiles/IOPLY.dir/objects.a(vtkPLY.cxx.obj):vtkPLY.cxx:(.text+0x5aff): undefined reference to `vtkResourceParser::vtkParserContext::Read(char*, unsigned long long)'
/usr/lib/gcc/x86_64-w64-mingw32/12.2.0/../../../../x86_64-w64-mingw32/bin/ld: CMakeFiles/IOPLY.dir/objects.a(vtkPLY.cxx.obj):vtkPLY.cxx:(.text+0x5c6e): undefined reference to `vtkResourceParser::vtkParserContext::Read(char*, unsigned long long)'
/usr/lib/gcc/x86_64-w64-mingw32/12.2.0/../../../../x86_64-w64-mingw32/bin/ld: CMakeFiles/IOPLY.dir/objects.a(vtkPLY.cxx.obj):vtkPLY.cxx:(.text+0x5ddf): more undefined references to `vtkResourceParser::vtkParserContext::Read(char*, unsigned long long)' follow
collect2: error: ld returned 1 exit status
make[2]: *** [IO/PLY/CMakeFiles/IOPLY.dir/build.make:143: bin/libvtkIOPLY-9.2.dll] Error 1
make[1]: *** [CMakeFiles/Makefile2:8166: IO/PLY/CMakeFiles/IOPLY.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
I believe this could be related to !9764 (merged)
I noticed that the subclass vtkParserContext from IO/Core/vtkResourceParser.h is not declared with VTKIOCORE_EXPORT
Edited by Julien Schueller