When compiling software that includes vtkFloatArray.h
with Qtcreator and gcc 9.3 as compiler on Ubuntu 20.04 I receive the following error:
/usr/local/include/vtk-8.2/vtkFloatArray.h:38:3: error: definition provided for explicit instantiation
38 | vtkTypeMacro(vtkFloatArray, vtkDataArray)
| ^~~~~~~~~~~~
The code highlighted is:
class VTKCOMMONCORE_EXPORT vtkFloatArray : public vtkDataArray
{
public:
vtkTypeMacro(vtkFloatArray, vtkDataArray)
I also tried to compile this code on Windows with VisualStudio 2019 I didn’t receive this error.
Does somebody kindly have any idea what this error means?
ben.boeckel
(Ben Boeckel (Kitware))
April 29, 2020, 12:53pm
2
@RobertMaynard @AllisonVacanti @allison.vacanti (not sure which one is the active account)
amaclean
(Andrew Maclean)
April 30, 2020, 2:13am
3
The master version of VTK builds ok with no errors with gcc 9.3 on Ubuntu 20.04. So this is most likely a vtk-8.2 issue.
Thank you for the confirmation, @Andrew . I will thus investigate a bit more and see whether there might be some setting on my system that cause the problem.
Thank you again @Andrew for your help. I realized this was a problem on my system. Thanks for your help and for checking.
amaclean
(Andrew Maclean)
April 30, 2020, 8:58am
6
Glad to help. I’m pleased you solved it.