<b>Hello&nbsp; all,<br>&nbsp;<br> I&#39;m starting to work with ITK and I&#39;m trying to read an image (*.jpg)&nbsp; but some errors occur when I build all project.<br>These are the errors:</b><br><br>1&gt;..\..\src\readImage\readImage.cxx(17) : error C2598: linkage specification must be at global scope<br>
1&gt;..\..\src\readImage\readImage.cxx(17) : warning C4518: &#39;const int &#39; : storage-class or type specifier(s) unexpected here; ignored<br>1&gt;..\..\src\readImage\readImage.cxx(17) : warning C4502: &#39;linkage specification&#39; requires use of keyword &#39;extern&#39; and must precede all other specifiers<br>
1&gt;..\..\src\readImage\readImage.cxx(17) : error C2537: &#39;football.jpg&#39; : illegal linkage specification<br>1&gt;..\..\src\readImage\readImage.cxx(17) : error C2513: &#39;int&#39; : no variable declared before &#39;=&#39;<br>
1&gt;Build log was saved at &quot;file://w:\Registration_Review\bin\readImage\readImage.dir\Debug\BuildLog.htm&quot;<br>1&gt;readImage - 3 error(s), 2 warning(s)<br>2&gt;------ Build started: Project: ALL_BUILD, Configuration: Debug x64 ------<br>
2&gt;&quot;Build all projects&quot;<br>2&gt;Build log was saved at &quot;file://w:\Registration_Review\bin\readImage\ALL_BUILD.dir\Debug\BuildLog.htm&quot;<br>2&gt;ALL_BUILD - 0 error(s), 0 warning(s)<br>========== Build: 1 succeeded, 1 failed, 1 up-to-date, 0 skipped ==========<br>
<br><b>CMake Lists.txt that I use is:</b><br><br># This project is designed to be built outside the Insight source tree.<br><br>PROJECT(readImage)<br><br># Find ITK<br><br>INCLUDE_REGULAR_EXPRESSION(&quot;^.*$&quot;)<br><br>
FIND_PACKAGE(ITK REQUIRED)<br><br>IF(ITK_FOUND)<br>&nbsp; INCLUDE(${ITK_USE_FILE})<br>ENDIF(ITK_FOUND)<br><br>ADD_EXECUTABLE(readImage readImage.cxx )<br><br>TARGET_LINK_LIBRARIES(readImage ITKIO)<br><br><br><b>And file *.cxx is: </b><br>
<br><br>#if defined(_MSC_VER)<br>#pragma warning ( disable : 4786 )<br>#endif<br><br>#include &quot;itkImage.h&quot;<br>#include &quot;itkImageFileReader.h&quot;<br><br>int main( int , int argv[1])<br>{<br>&nbsp; typedef unsigned int&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; PixelType;<br>
&nbsp; const unsigned int&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Dimension = 3;<br><br>&nbsp; typedef itk::Image&lt; PixelType, Dimension &gt; ImageType;<br>&nbsp; typedef itk::ImageFileReader&lt; ImageType &gt;&nbsp; ReaderType;<br><br>&nbsp; ReaderType::Pointer reader = ReaderType::New();<br>
&nbsp; const int &quot;football.jpg&quot; = argv[1];<br>&nbsp; reader-&gt;SetFileName(&quot;football.jpg&quot;);<br>&nbsp; reader-&gt;Update();<br>&nbsp; ImageType::Pointer image = reader-&gt;GetOutput();<br><br>&nbsp; return 0;<br>}<br><br><b>thanks in advance to all those who can help me with this problem because I am just a novice in this language programming  </b><br>
-- <br><br>Leidy Paola Dorado-Muņoz<br>