-
-
Notifications
You must be signed in to change notification settings - Fork 4.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add missing PCL_EXPORTS in pcl_visualizer.h #1995
Conversation
When using PCL in Visual C++ projects with enabled common language runtime support (/CLR option), including pcl_visualizer.h yields a link error LNK2001 since FPSCallback is used (cf. line 1986) while FPSCallback::Execute() is pure virtual and there is no other derived struct providing an implementation. Hence, supplying a default implementation fixes this link error. Maybe see also this thread on stackoverflow where the same issue has already been discussed: https://stackoverflow.com/questions/26889614/error-lnk2001-when-including-pcl-visualizer-h
The function As an alternative solution, can you instead try to add struct PCL_EXPORTS FPSCallback : public vtkCommand and see if it helps on Windows. |
Thanks for your comment! |
If it turns out to work, please add |
Sure, I added them and test it soon |
Just finished the recompiling of PCL; the functions are exported by the dll right now and this fixes this issue. However, there seems to be a general problem in other files (for instance including <pcl/visualization/range_image_visualizer.h> yields link errors link errors as well). Maybe these are caused by some other missing PCL_EXPORTS, but I did not dig into this issue so far... For the moment I updated pcl_visulizer.h in my PR, expecting a successful build :-) |
Thanks |
Add PCL_EXPORTS to private command classes within PCLVisualizer
When using PCL in Visual C++ projects with enabled common language runtime support (/CLR option), including pcl_visualizer.h yields a link error LNK2001 since FPSCallback is used (cf. line 1986) while FPSCallback::Execute() is pure virtual and there is no other derived struct providing an implementation. Hence, supplying a default implementation fixes this link error.
Maybe see also this thread on stackoverflow where the same issue has already been discussed: https://stackoverflow.com/questions/26889614/error-lnk2001-when-including-pcl-visualizer-h