Building ITK-SNAP on Windows with Visual Studio 12 from GIT source (28.07.2016 12:45:16; 46aab1566f5414b35dccb063251205e6e4999b0e)

172 views
Skip to first unread message

Łukasz Groszkowski

unread,
Aug 31, 2016, 7:18:01 AM8/31/16
to itksnap-developers
Hi,
I've encountered problems with building ITK-SNAP from source (Win10, x64, MSVC2013). 
I'm compiling from following revision (no tag, so I'll just paste enough to identify commit):

Revision: 46aab1566f5414b35dccb063251205e6e4999b0e
Author: Paul Yushkevich <allura@localhost>
Date: 28.07.2016 12:45:16
Message:
Merge /u/vicory/itk-snap/ branch master into master

https://sourceforge.net/p/itk-snap/src/merge-requests/3/
----
Modified: CMakeLists.txt
Added: Common/ITKExtras/itkMorphologicalContourInterpolator.h
Added: Common/ITKExtras/itkMorphologicalContourInterpolator.hxx
Modified: GUI/Model/InterpolateLabelModel.cxx
Modified: GUI/Model/InterpolateLabelModel.h
Modified: GUI/Qt/Windows/InterpolateLabelsDialog.cxx
Modified: GUI/Qt/Windows/InterpolateLabelsDialog.h
Modified: GUI/Qt/Windows/InterpolateLabelsDialog.ui
Modified: Testing/Logic/iteratorTests.cxx
Modified: Testing/Logic/itkImageRegionIteratorTest.cxx
 
I'm compiling VTK (6.3.0) and ITK (4.8.2) from sources without errors. I use Qt5.4. All according to instructions on http://www.itksnap.org/pmwiki/pmwiki.php%3Fn%3DDocumentation.BuildingITK-SNAP
I've also followed instructions from README.git and installed additional modules.

However, I'm getting errors while compiling, mardown_to_hex project:
1>------ Build started: Project: markdown_to_hex, Configuration: Debug x64 ------
1>  hexdump.cpp
1>..\..\..\src\Submodules\c3d\utilities\hexdump.cpp(1940): error C2275: 'FILE' : illegal use of this type as an expression
1>          C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\include\stdio.h(73) : see declaration of 'FILE'
1>..\..\..\src\Submodules\c3d\utilities\hexdump.cpp(1940): error C2065: 'fp' : undeclared identifier
1>..\..\..\src\Submodules\c3d\utilities\hexdump.cpp(1942): error C2065: 'fp' : undeclared identifier
1>..\..\..\src\Submodules\c3d\utilities\hexdump.cpp(1942): warning C4047: '=' : 'int' differs in levels of indirection from 'FILE *'
1>..\..\..\src\Submodules\c3d\utilities\hexdump.cpp(1945): error C2065: 'fp' : undeclared identifier
1>..\..\..\src\Submodules\c3d\utilities\hexdump.cpp(1945): warning C4047: 'function' : 'FILE *' differs in levels of indirection from 'int'
1>..\..\..\src\Submodules\c3d\utilities\hexdump.cpp(1945): warning C4024: 'run' : different types for formal and actual parameter 2
1>..\..\..\src\Submodules\c3d\utilities\hexdump.cpp(1947): error C2065: 'fp' : undeclared identifier
1>..\..\..\src\Submodules\c3d\utilities\hexdump.cpp(1947): warning C4047: 'function' : 'FILE *' differs in levels of indirection from 'int'
1>..\..\..\src\Submodules\c3d\utilities\hexdump.cpp(1947): warning C4024: 'fclose' : different types for formal and actual parameter 1
 
in consequence (obvious):
2>------ Build started: Project: markdown_docs, Configuration: Debug x64 ------
2>  Building Custom Rule C:/Users/DELL/Workbench/workspace-msvc/ITK-SNAP/ITK-SNAP/src/Submodules/c3d/CMakeLists.txt
2>  CMake does not need to re-run because C:\Users\DELL\Workbench\workspace-msvc\ITK-SNAP\ITK-SNAP\build\Submodules\c3d\CMakeFiles\generate.stamp is up-to-date.
2>  Generating markdown_docs.h
2>  'Debug\markdown_to_hex.exe' is not recognized as an internal or external command,
2>  operable program or batch file.
2>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V120\Microsoft.CppCommon.targets(170,5): error MSB6006: "cmd.exe" exited with code 9009. 
 
and itksnapui_model:
4>------ Build started: Project: itksnapui_model, Configuration: Debug x64 ------
4>  InterpolateLabelModel.cxx
4>C:\Users\DELL\Workbench\workspace-msvc\ITK-SNAP\ITK-SNAP\src\Common\ITKExtras\itkMorphologicalContourInterpolator.h(355): error C3646: 'ITK_DELETE_FUNCTION' : unknown override specifier
4>          C:\Users\DELL\Workbench\workspace-msvc\ITK-SNAP\ITK-SNAP\src\Common\ITKExtras\itkMorphologicalContourInterpolator.h(358) : see reference to class template instantiation 'itk::MorphologicalContourInterpolator<TImage>' being compiled
4>C:\Users\DELL\Workbench\workspace-msvc\ITK-SNAP\ITK-SNAP\src\Common\ITKExtras\itkMorphologicalContourInterpolator.h(356): error C3646: 'ITK_DELETE_FUNCTION' : unknown override specifier
4>c:\users\dell\workbench\workspace-msvc\itk-snap\itk-snap\src\common\itkextras\itkMorphologicalContourInterpolator.h(355): error C3646: 'ITK_DELETE_FUNCTION' : unknown override specifier
4>          C:\Users\DELL\Workbench\workspace-msvc\ITK-SNAP\ITK-SNAP\src\GUI\Model\InterpolateLabelModel.cxx(55) : see reference to class template instantiation 'itk::MorphologicalContourInterpolator<GenericImageData::LabelImageType>' being compiled
4>c:\users\dell\workbench\workspace-msvc\itk-snap\itk-snap\src\common\itkextras\itkMorphologicalContourInterpolator.h(356): error C3646: 'ITK_DELETE_FUNCTION' : unknown override specifier 

 Now I'm attempting to try a nightly build by running Nightly project from Visual Studio solution tree. I had to rerun git submodule init, git submodule update (added greedy), however the 1> bug problem remains so far.

I may have a clue that this is somehow linked with following problem from Cmake (it run after I attempted to get Nightly)
1>CUSTOMBUILD : CMake error : CMake can not determine linker language for target: markdown_to_hex

I have compiled ITK-SNAP successfully not so long ago (probably around a year ago) when there were first versions of ITK-SNAP with Qt5.

If I can provide more info I'll, just let me know. If there's a ticket with this problem, well I couldn't find it. And if there's a solution to it, I'd be thankful if someone could share it. 

best wishes,
Lukasz Groszkowski
Warsaw University of Technology

Paul Yushkevich

unread,
Aug 31, 2016, 7:42:19 AM8/31/16
to itksn...@googlegroups.com
Hello

Try building the latest master in git. Also make sure to do 

git submodule update --init

That fixes at least some of these errors. The error in hexdump is something I have not seen before, but looks like a missing header. If you find a quick fix please let me know and I will update the master. 

Thanks 
Paul 
--
You received this message because you are subscribed to the Google Groups "itksnap-developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to itksnap-dev+unsubscribe@googlegroups.com.
To post to this group, send email to itksn...@googlegroups.com.
Visit this group at https://groups.google.com/group/itksnap-dev.
For more options, visit https://groups.google.com/d/optout.


--
Paul A. Yushkevich, Ph.D.
Associate Professor
Penn Image Computing and Science Laboratory
Department of Radiology
University of Pennsylvania

Łukasz Groszkowski

unread,
Aug 31, 2016, 8:10:26 AM8/31/16
to itksn...@googlegroups.com

Okay, I figured it out. This problem was caused by wierd problem with MSVC 2013 C compiler, that couldn't somehow cope without braces of if case in C. Check my .patch. I can prepare a pull request or you can use my patch if it helps.

Cheers,

Lukasz


W dniu 31.08.2016 o 13:42, Paul Yushkevich pisze:
You received this message because you are subscribed to a topic in the Google Groups "itksnap-developers" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/itksnap-dev/EzvrruyP_ic/unsubscribe.
To unsubscribe from this group and all its topics, send an email to itksnap-dev...@googlegroups.com.

To post to this group, send email to itksn...@googlegroups.com.
Visit this group at https://groups.google.com/group/itksnap-dev.
For more options, visit https://groups.google.com/d/optout.




Avast logo

Ta wiadomość została sprawdzona na obecność wirusów przez oprogramowanie antywirusowe Avast.
www.avast.com


0001-Fixed-hexdump.c-for-compilation-using-MSVC-2013.patch

Łukasz Groszkowski

unread,
Sep 1, 2016, 3:59:34 AM9/1/16
to itksn...@googlegroups.com

That's really weird. I asked one of my students to compile ITK-SNAP according to instructions and it went smooth without discussed problem in hexdump.c I encountered.

I wonder, how I can check what's the reason behind it. I blame the C compiler in MSVC.

best wishes,

Lukasz Groszkowski


W dniu 31.08.2016 o 13:42, Paul Yushkevich pisze:
Hello
You received this message because you are subscribed to a topic in the Google Groups "itksnap-developers" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/itksnap-dev/EzvrruyP_ic/unsubscribe.
To unsubscribe from this group and all its topics, send an email to itksnap-dev...@googlegroups.com.
To post to this group, send email to itksn...@googlegroups.com.
Visit this group at https://groups.google.com/group/itksnap-dev.
For more options, visit https://groups.google.com/d/optout.

Paul Yushkevich

unread,
Sep 1, 2016, 9:49:47 AM9/1/16
to itksn...@googlegroups.com
Thanks for the patch! It's been applied. Please remember to update the submodules.

To unsubscribe from this group and all its topics, send an email to itksnap-dev+unsubscribe@googlegroups.com.

To post to this group, send email to itksn...@googlegroups.com.
Visit this group at https://groups.google.com/group/itksnap-dev.
For more options, visit https://groups.google.com/d/optout.

Avast logo

Ta wiadomość została sprawdzona na obecność wirusów przez oprogramowanie antywirusowe Avast.
www.avast.com


--
You received this message because you are subscribed to the Google Groups "itksnap-developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to itksnap-dev+unsubscribe@googlegroups.com.
To post to this group, send email to itksn...@googlegroups.com.
Visit this group at https://groups.google.com/group/itksnap-dev.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages