-
-
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
[compile error] Fix openNURBS compile issue under Windows #4314
Comments
Which VTK version do you use? For some reason I can't reproduce right now with the VTK9 branch I'm working on. Though I'm not sure if it is related... |
Do you have |
I did see this error before locally. But the only change since then is the vtk 8.2 -> vtk 9. |
Mhm interesting. Can you try it again with VTK 8.2? |
Did you build in debug? I did release. You mention in this old PR #3140 (comment) That it happens in debug ? |
Ah yes, Debug build |
pcl/surface/include/pcl/surface/3rdparty/opennurbs/opennurbs_error.h Lines 47 to 53 in c440618
Think we need to add either PCL_EXPORT to this. OR add the two defines: ON_DLL_EXPORTS However, it now complained about linking to: Needs a bit more digging :D |
Same here with |
Its happening in this file by pragmas: Probably easier to add the PCL_EXPORT in front of all the debug functions. |
Currently you are getting following compile issue under windows in case you have
BUILD_surface_on_nurbs
enabled:Reason is the missing macro
ON_DLL_TEMPLATE
, caused by missing macroON_DLL_EXPORTS
pcl/surface/include/pcl/surface/3rdparty/opennurbs/opennurbs_extensions.h
Lines 139 to 167 in 8eb4768
The macro will be defined here:
pcl/surface/include/pcl/surface/3rdparty/opennurbs/opennurbs_defines.h
Lines 88 to 123 in c440618
To enable this block
OPENNURBS_EXPORTS
needs to be definedpcl/surface/include/pcl/surface/3rdparty/opennurbs/opennurbs_defines.h
Lines 66 to 70 in c440618
And surprise:
OPENNURBS_EXPORTS
will be never be defined.A long time ago there was already a try to fix issues with it, but this fix was incomplete.
So we have the choice:
OPENNURBS_EXPORTS
flag: In this case we need to exportOPENNURBS_IMPORTS
, too and revert the old fix. Otherwise you are getting tons of warnings:warning C4141: 'dllexport': used more than once (compiling source file C:\dev\pcl\surface\src\3rdparty\opennurbs\opennurbs_3dm_attributes.cpp)
ON_CLASS
and all other openNURBS specific macros by e.g.PCL_EXPORTS
. In this case we have currently no replacement for e.g.ON_DLL_TEMPLATE
The text was updated successfully, but these errors were encountered: