I don't know if it is important, but in "Includes" folder in Eclipse, the path "/usrlocal//include/ITK-4.2" is not there.<br><br><div class="gmail_quote">On 26 September 2012 14:12, Gabriel Santiago <span dir="ltr"><<a href="mailto:santiago.eletrica@gmail.com" target="_blank">santiago.eletrica@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Well, I did use "Eclipse CDT 4" option, but still not working.<br><br>Actually, I am using Eclipse Indigo. Could this be a problem?<div class="HOEnZb">
<div class="h5"><br><br><div class="gmail_quote">On 26 September 2012 14:03, Matt McCormick <span dir="ltr"><<a href="mailto:matt.mccormick@kitware.com" target="_blank">matt.mccormick@kitware.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">PS. Please reply-to-all so the messages are archived on the mailing list.<br>
<br>
On Wed, Sep 26, 2012 at 12:59 PM, Matt McCormick<br>
<<a href="mailto:matt.mccormick@kitware.com" target="_blank">matt.mccormick@kitware.com</a>> wrote:<br>
> Hi Gabriel,<br>
><br>
<div>> You must use CMake to generate the Makefiles/Project Files. Then, use<br>
> your build system of choice to run the Makefiles/Project Files. The<br>
> CMake default "generator" on Linux is "Unix Makefiles". If you use<br>
> this, then run the "make" command in the CMake binary directory. If<br>
> you want to use Eclipse, you must specify the "Eclipse CDT4 - Unix<br>
> Makefiles" generator. This will create Eclipse CDT 4.9 projects<br>
</div>> files. You need to use these when you try to build, so Eclipse will not<br>
<div><div>> know where to look for the header files, libraries.<br>
><br>
> HTH,<br>
> Matt<br>
><br>
> On Wed, Sep 26, 2012 at 12:43 PM, Gabriel Santiago<br>
> <<a href="mailto:santiago.eletrica@gmail.com" target="_blank">santiago.eletrica@gmail.com</a>> wrote:<br>
>> Ok, I just run the example and got the same error:<br>
>><br>
>> fatal error: vcl_config_manual.h: No such file or directory<br>
>> ComputeGradientMagnitudeOfGrayscaleImage line 242, external location:<br>
>> /usr/local/include/ITK-4.2/vcl_compiler.h C/C++ Problem<br>
>><br>
>><br>
>><br>
>> On 26 September 2012 13:31, Gabriel Santiago <<a href="mailto:santiago.eletrica@gmail.com" target="_blank">santiago.eletrica@gmail.com</a>><br>
>> wrote:<br>
>>><br>
>>> In fact, when I import those files to Eclipse, it shows that every single<br>
>>> line of the code has some kind of error and I can not build it.<br>
>>><br>
>>><br>
>>> On 26 September 2012 13:28, Gabriel Santiago <<a href="mailto:santiago.eletrica@gmail.com" target="_blank">santiago.eletrica@gmail.com</a>><br>
>>> wrote:<br>
>>>><br>
>>>> Yes, that's correct. That's the the ITK_DIR:<br>
>>>> /usr/local/lib/cmake/ITK-4.2/<br>
>>>> I am trying to run the example you told me. But no success up to now...<br>
>>>> What should I do?<br>
>>>><br>
>>>> thx!<br>
>>>><br>
>>>><br>
>>>> On 26 September 2012 13:24, Matt McCormick <<a href="mailto:matt.mccormick@kitware.com" target="_blank">matt.mccormick@kitware.com</a>><br>
>>>> wrote:<br>
>>>>><br>
>>>>> Hi Gabriel,<br>
>>>>><br>
>>>>> On Wed, Sep 26, 2012 at 12:02 PM, Gabriel Santiago<br>
>>>>> <<a href="mailto:santiago.eletrica@gmail.com" target="_blank">santiago.eletrica@gmail.com</a>> wrote:<br>
>>>>> > Thank you, Matt. But can you please, tell step by step exactly what<br>
>>>>> > should I<br>
>>>>> > do? I am a beginner to this CMake thing. What should be the ITK_DIR<br>
>>>>> > correct<br>
>>>>> > configuration?<br>
>>>>><br>
>>>>> ITK_DIR should be the directory containing the file ITKConfig.cmake.<br>
>>>>> If ITK is not install, it is the location of the binary build<br>
>>>>> directory. If ITK is installed, I believe in your case it would be<br>
>>>>> /usr/local/lib/cmake/ITK-4.2/<br>
>>>>><br>
>>>>> HTH,<br>
>>>>> Matt<br>
>>>>><br>
>>>>><br>
>>>>> ><br>
>>>>> > Thanks again,<br>
>>>>> ><br>
>>>>> ><br>
>>>>> > On 26 September 2012 12:35, Matt McCormick<br>
>>>>> > <<a href="mailto:matt.mccormick@kitware.com" target="_blank">matt.mccormick@kitware.com</a>><br>
>>>>> > wrote:<br>
>>>>> >><br>
>>>>> >> On Wed, Sep 26, 2012 at 10:37 AM, Gabriel Santiago<br>
>>>>> >> <<a href="mailto:santiago.eletrica@gmail.com" target="_blank">santiago.eletrica@gmail.com</a>> wrote:<br>
>>>>> >> > Hi Matt,<br>
>>>>> >> ><br>
>>>>> >> > Thanks for your reply.<br>
>>>>> >> ><br>
>>>>> >> > Here it is:<br>
>>>>> >> > //- File name: myProject.cpp in myProject folder.<br>
>>>>> >> > // -- Code:<br>
>>>>> >> ><br>
>>>>> >> > #include "/usr/local/include/ITK-4.2/itkImage.h"<br>
>>>>> >> > #include "/usr/local/include/ITK-4.2/itkImageFileReader.h"<br>
>>>>> >> > #include<br>
>>>>> >> > "/usr/local/include/ITK-4.2/itkGradientMagnitudeImageFilter.h"<br>
>>>>> >> ><br>
>>>>> >> > int main(int arcg, char** argv)<br>
>>>>> >> > {<br>
>>>>> >> > typedef itk::Image<unsigned short, 2> ImageType;<br>
>>>>> >> > typedef itk::ImageFileReader<ImageType> ReaderType;<br>
>>>>> >> > typedef itk::GradientMagnitudeImageFilter<ImageType, ImageType><br>
>>>>> >> > FilterType;<br>
>>>>> >> ><br>
>>>>> >> > ReaderType::Pointer reader = ReaderType::New();<br>
>>>>> >> > FilterType::Pointer filter = FilterType::New();<br>
>>>>> >> ><br>
>>>>> >> > reader->SetFileName(argv[1]);<br>
>>>>> >> > filter->SetInput(reader->GetOutput());<br>
>>>>> >> > filter->Update();<br>
>>>>> >> ><br>
>>>>> >> > return 0;<br>
>>>>> >> ><br>
>>>>> >> > }<br>
>>>>> >> ><br>
>>>>> >> > // -- CMakeLists.txt in myProject folder.<br>
>>>>> >> ><br>
>>>>> >> > PROJECT( myProject )<br>
>>>>> >> > FIND_PACKAGE ( ITK REQUIRED )<br>
>>>>> >> > IF ( ITK_FOUND )<br>
>>>>> >> > INCLUDE( ${ITK_USE_FILE} )<br>
>>>>> >> > ENDIF( ITK_FOUND )<br>
>>>>> >> > ADD_EXECUTABLE( myProject myProject.cpp )<br>
>>>>> >> > TARGET_LINK_LIBRARIES ( myProject ITKCommon ITKIO)<br>
>>>>> >> ><br>
>>>>> >> ><br>
>>>>> >> > Ow! And I forgot to mention that in order to make things work, I<br>
>>>>> >> > had to<br>
>>>>> >> > include the whole path to itk libraries.<br>
>>>>> >><br>
>>>>> >> Yes, that should not be necessary. It should be '#include<br>
>>>>> >> "itkImage.h"', etc. The "INCLUDE" statement of your CMakeLists.txt<br>
>>>>> >> should be calling the CMake "include_directories" statement, which<br>
>>>>> >> sets up the right include "-I" flags when building.<br>
>>>>> >><br>
>>>>> >> Some sanity checks:<br>
>>>>> >><br>
>>>>> >> * Make sure ITK_DIR is set correctly in the CMake configuration.<br>
>>>>> >> * build with "make VERBOSE=1" and make use there is a<br>
>>>>> >> "-I/usr/local/include/ITK-4.2"<br>
>>>>> >><br>
>>>>> >> Try this example (code downloadable in the sidebar on the left):<br>
>>>>> >><br>
>>>>> >><br>
>>>>> >><br>
>>>>> >> <a href="http://itk.org/ITKExamples/Examples/Filtering/ImageGradient/ComputeGradientMagnitudeOfGrayscaleImage/ComputeGradientMagnitudeOfGrayscaleImage.html" target="_blank">http://itk.org/ITKExamples/Examples/Filtering/ImageGradient/ComputeGradientMagnitudeOfGrayscaleImage/ComputeGradientMagnitudeOfGrayscaleImage.html</a><br>
>>>>> >><br>
>>>>> >> Hope this helps,<br>
>>>>> >> Matt<br>
>>>>> >><br>
>>>>> >><br>
>>>>> >> ><br>
>>>>> >> ><br>
>>>>> >> > On 26 September 2012 11:34, Matt McCormick<br>
>>>>> >> > <<a href="mailto:matt.mccormick@kitware.com" target="_blank">matt.mccormick@kitware.com</a>><br>
>>>>> >> > wrote:<br>
>>>>> >> >><br>
>>>>> >> >> Hi Gabriel,<br>
>>>>> >> >><br>
>>>>> >> >> Could you please share the source code you are using for the<br>
>>>>> >> >> project.<br>
>>>>> >> >><br>
>>>>> >> >> Thanks,<br>
>>>>> >> >> Matt<br>
>>>>> >> >><br>
>>>>> >> >> On Wed, Sep 26, 2012 at 10:12 AM, Gabriel Santiago<br>
>>>>> >> >> <<a href="mailto:santiago.eletrica@gmail.com" target="_blank">santiago.eletrica@gmail.com</a>> wrote:<br>
>>>>> >> >> > Hi guys,<br>
>>>>> >> >> ><br>
>>>>> >> >> > I am trying to run ITK on my Ubuntu 12.04.1. I did exactly what<br>
>>>>> >> >> > the<br>
>>>>> >> >> > tutorial<br>
>>>>> >> >> > says, except that my Cmake and ITK are the most recent versions.<br>
>>>>> >> >> > I also installed the CMake gui interface, which does exactly<br>
>>>>> >> >> > what the<br>
>>>>> >> >> > ccmake<br>
>>>>> >> >> > does and has the same interface that the Windows version.<br>
>>>>> >> >> ><br>
>>>>> >> >> > After I installed ITK on my linux, I tried myProject example, as<br>
>>>>> >> >> > described<br>
>>>>> >> >> > in the tutorial. After I made the .cpp (or .cxx) file and the<br>
>>>>> >> >> > CMakeLists.txt<br>
>>>>> >> >> > with the same code found in "Getting Started I", I used CMake,<br>
>>>>> >> >> > choosing<br>
>>>>> >> >> > my<br>
>>>>> >> >> > /workspace/myProject as source folder and<br>
>>>>> >> >> > /workspace/myProject/bin as<br>
>>>>> >> >> > binary<br>
>>>>> >> >> > directory. Everything seems to work fine, until I try to build<br>
>>>>> >> >> > it.<br>
>>>>> >> >> ><br>
>>>>> >> >> > I get the following error message:<br>
>>>>> >> >> ><br>
>>>>> >> >> > fatal error: vcl_config_manual.h: No such file or directory<br>
>>>>> >> >> > myProject<br>
>>>>> >> >> > line 242, external location:<br>
>>>>> >> >> > /usr/local/include/ITK-4.2/vcl_compiler.h<br>
>>>>> >> >> > C/C++ Problem<br>
>>>>> >> >> ><br>
>>>>> >> >> > Can anyone, please, help me?<br>
>>>>> >> >> ><br>
>>>>> >> >> > Thanks in advance,<br>
>>>>> >> >> ><br>
>>>>> >> >> > --<br>
>>>>> >> >> > Gabriel Santiago<br>
>>>>> >> >> ><br>
>>>>> >> ><br>
>>>>> >> ><br>
>>>>> >> ><br>
>>>>> >> ><br>
>>>>> ><br>
>>>>> ><br>
>>>>> ><br>
>>>>> ><br>
>>>>> > --<br>
<br>
<br>
</div></div></blockquote></div><br>
</div></div></blockquote></div>