<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Try changing:<div><br></div><div>TARGET_LINK_LIBRARIES( MyFirstIO ITKCommon )</div><div><br></div><div>to:</div><div><br></div><div>TARGET_LINK_LIBRARIES( MyFirstIO&nbsp;${ITK_LIBRARIES} )</div><div><br></div><div><br></div><div>This should link your executable to all ITK libraries not just ITKCommon.</div><div><br></div><div><br><div><br><div><div>On Nov 2, 2011, at 11:39 AM, faba wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div>Thanks a lot Jon,<br>I am also thinking this problem comes from linkers. I checked and saw that<br>CMakeLists.txt contains the appropriate reference to the location of the ITK<br>libraries. I have also attached my &nbsp;CMakeLists.txt and the results on CMake<br>page. It would be great if you could take a look at them to find out what is<br>the problem. I am really confused and whatever I &nbsp;change makes it worse! <br>(the name of my project and my cpp file are MyFirstIO)<br><br>- <a href="http://itk-insight-users.2283740.n2.nabble.com/file/n6955729/4.jpg">http://itk-insight-users.2283740.n2.nabble.com/file/n6955729/4.jpg</a> <br><br>- <a href="http://itk-insight-users.2283740.n2.nabble.com/file/n6955729/5.jpg">http://itk-insight-users.2283740.n2.nabble.com/file/n6955729/5.jpg</a> <br><br>--<br>View this message in context: <a href="http://itk-insight-users.2283740.n2.nabble.com/Read-Write-Program-tp6955425p6955729.html">http://itk-insight-users.2283740.n2.nabble.com/Read-Write-Program-tp6955425p6955729.html</a><br>Sent from the ITK Insight Users mailing list archive at <a href="http://Nabble.com">Nabble.com</a>.<br>_____________________________________<br>Powered by <a href="http://www.kitware.com">www.kitware.com</a><br><br>Visit other Kitware open-source projects at<br><a href="http://www.kitware.com/opensource/opensource.html">http://www.kitware.com/opensource/opensource.html</a><br><br>Kitware offers ITK Training Courses, for more information visit:<br>http://www.kitware.com/products/protraining.html<br><br>Please keep messages on-topic and check the ITK FAQ at:<br>http://www.itk.org/Wiki/ITK_FAQ<br><br>Follow this link to subscribe/unsubscribe:<br>http://www.itk.org/mailman/listinfo/insight-users<br></div></blockquote></div><br><div>
<span class="Apple-style-span" style="font-size: 12px; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><span class="Apple-style-span" style="border-collapse: separate; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; -webkit-text-decorations-in-effect: none; text-indent: 0px; -webkit-text-size-adjust: auto; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px; "><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><font face="Helvetica" size="3" style="font: normal normal normal 12px/normal Helvetica; ">========================================================</font></p><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><font face="Helvetica" size="3" style="font: normal normal normal 12px/normal Helvetica; ">Bradley Lowekamp<span class="Apple-converted-space">&nbsp;</span><span class="Apple-converted-space">&nbsp;</span></font></p><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><font face="Helvetica" size="3" style="font: normal normal normal 12px/normal Helvetica; ">Medical Science and Computing for</font></p><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><font face="Helvetica" size="3" style="font: normal normal normal 12px/normal Helvetica; ">Office of High Performance Computing and Communications</font></p><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><font face="Helvetica" size="3" style="font: normal normal normal 12px/normal Helvetica; ">National Library of Medicine<span class="Apple-converted-space">&nbsp;</span></font></p><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><font face="Helvetica" size="3" style="font: normal normal normal 12px/normal Helvetica; "><a href="mailto:blowekamp@mail.nih.gov">blowekamp@mail.nih.gov</a></font></p><br class="Apple-interchange-newline"></span></div></span><br class="Apple-interchange-newline">
</div>
<br></div></div></body></html>