I’m trying to build my VTK library with Qt6 and mingw-64 compiler.
When I launch my build, with any version (9.3.x) of VTK the following error appears:
UserPath\vtk\Utilities\KWSys\vtksys\SystemTools.cxx:3296:30: error: 'ERROR_SYMLINK_NOT_SUPPORTED' was not declared in this scope
UserPath\vtk\Utilities\KWSys\vtksys\SystemTools.cxx:3296:30: note: suggested alternative: 'ERROR_BIDI_NOT_SUPPORTED'
mingw32-make.exe: *** [Utilities\KWSys\vtksys\CMakeFiles\vtksys.dir\build.make:226: Utilities/KWSys/vtksys/CMakeFiles/vtksys.dir/SystemTools.cxx.obj] Error 1
mingw32-make.exe: *** [CMakeFiles\Makefile2:4241: Utilities/KWSys/vtksys/CMakeFiles/vtksys.dir/all] Error 2
mingw32-make.exe: *** [Makefile:135: all] Error 2
Can you help me with this?
Can you, please, check whether the offending file
No trace of winerror.h in that file !
Thank you for your reply,
Please, try adding
#include <winerror.h> to the source file in question, build and report the outcome.
I included :
Since “windows.h” already includes “winerror.h”, it is not necessary to include “winerror.h” directly. E.g. see
the wikipedia page.
You can check your “winerror.h” to make sure it contains this line (it almost certainly does):
#define ERROR_SYMLINK_NOT_SUPPORTED 1464
You can also check your compiler to make sure that it defines
_WIN32. First, make an empty file “empty.c”, then run gcc like this:
gcc -E -dM empty.c
It should print a lot of things, including this:
#define _WIN32 1
Keep on investigating like this until you find out why
ERROR_SYMLINK_NOT_SUPPORTED is not defined. I do not use mingw, so I can’t help you any more than this.
It seems the MinGW’s
winerror.h does not define
ERROR_SYMLINK_NOT_SUPPORTED. I guess this may be something to report to the MinGW project.
Paulo, are you sure about that? Did you check?
Mine has it. I can’t say for the OP’s.
It looks like it has been there since MinGW 6.0.0 (Sep 2018) according to
this blame. A
-E -fdirectives-only dump of the preprocessor output when compiling this file would be handy. To get this, take the command line CMake runs, replace
-o …/SystemTools.cxx.o with
-E -fdirectives-only -o preproc.txt and share the