Hi all,
Building ITK with MinGW64 comes clean but when using it in other library
gives the below error. Turning -fpermissive can solve this bug but its not
a option to be considered.
I had attached a patch which will resolve this issue.
[ 78%] Building CXX object
Code/ApplicationEngine/CMakeFiles/OTBApplicationEngine.dir/otbWrapperApplicationRegistry.cxx.obj
[ 79%] Building CXX object
Code/ApplicationEngine/CMakeFiles/OTBApplicationEngine.dir/otbWrapperChoiceParameter.cxx.obj
Linking CXX shared library ../../bin/libOTBTesting.dll
[ 79%] Built target OTBTesting
[ 79%] Building CXX object
Code/ApplicationEngine/CMakeFiles/OTBApplicationEngine.dir/otbWrapperInputImageListParameter.cxx.obj
[ 79%] Building CXX object
Code/ApplicationEngine/CMakeFiles/OTBApplicationEngine.dir/otbWrapperOutputImageParameter.cxx.obj
Scanning dependencies of target otbTestDriver
[ 79%] Building CXX object
Code/Testing/CMakeFiles/otbTestDriver.dir/otbTestDriver.cxx.obj
In file included from /.../OTB-Nightly/Code/Testing/otbTestDriver.cxx:35:0:
/home/rashad/packages/mxe/usr/x86_64-w64-mingw32.shared/include/ITK-4.6/itksys/SharedForward.h:
In function 'void kwsys_shared_forward_execvp(const char*, const char*
const*)':
/home/rashad/packages/mxe/usr/x86_64-w64-mingw32.shared/include/ITK-4.6/itksys/SharedForward.h:516:19:
error: invalid conversion from 'const char* const*' to 'char* const*'
[-fpermissive]
execvp(cmd, argv);
^
In file included from
/home/rashad/packages/mxe/usr/x86_64-w64-mingw32.shared/include/ITK-4.6/itksys/SharedForward.h:158:0,
from /.../OTB-Nightly/Code/Testing/otbTestDriver.cxx:35:
--
Regards,
Rashad
Binary files ITK.original/.git/index and ITK/.git/index differ
diff -burN ITK.original/Modules/ThirdParty/KWSys/src/KWSys/SharedForward.h.in ITK/Modules/ThirdParty/KWSys/src/KWSys/SharedForward.h.in
--- ITK.original/Modules/ThirdParty/KWSys/src/KWSys/SharedForward.h.in 2014-07-30 03:38:46.547938233 +0200
+++ ITK/Modules/ThirdParty/KWSys/src/KWSys/SharedForward.h.in 2014-07-30 03:37:16.114246728 +0200
@@ -512,6 +512,8 @@
/* Invoke the child process. */
#if defined(_MSC_VER)
_execvp(cmd, argv);
+#elif defined(__MINGW64__)
+ execvp(cmd, (char* const*)argv);
#elif defined(__MINGW32__)
execvp(cmd, argv);
#else
_______________________________________________
Powered by www.kitware.com
Visit other Kitware open-source projects at
http://www.kitware.com/opensource/opensource.html
Kitware offers ITK Training Courses, for more information visit:
http://kitware.com/products/protraining.php
Please keep messages on-topic and check the ITK FAQ at:
http://www.itk.org/Wiki/ITK_FAQ
Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/insight-developers