Hello everyone,
Since a couple of hours I am struggling to get this C++ example to compile and run properly with Xcode.
What I did to get here is:
Install vtk through “brew install vtk”
Added the search paths /opt/homebrew/Cellar/vtk/9.2.6_5/lib and /opt/homebrew/Cellar/vtk/9.2.6_5/include/vtk-9.2 to library and header search paths in Build Settings
If I do this, I am getting an error because of undefined symbols:
In this case the code does not compile.
Instead if I add in Build Phases all the dylibs contained in the lib folder, it does compile successfully!
It looks like you’re not using CMake to use VTK. There’s a lot of information VTK has CMake manage automatically that needs performed when using VTK as a series of flags to the compiler or settings for the IDE. In this instance, VTK is built against Python, but it lets the executable choose which Python. You’ll need to either link to a Python library/framework or remove the Python-needing library from the linker set if you’re not actually using it.