<html><body><div style="font-family: lucida console,sans-serif; font-size: 10pt; color: #000000"><div>Hey Matt, </div><div>Here is the extract from the CMakeLists.txt</div><div><br></div><div><p class="p1" style="margin: 0px;" data-mce-style="margin: 0px;">ADD_EXECUTABLE(testMapping testMapping.cxx)</p><p class="p1" style="margin: 0px;" data-mce-style="margin: 0px;">TARGET_LINK_LIBRARIES(testMapping ${ITK_LIBRARIES})</p><p class="p1" style="margin: 0px;" data-mce-style="margin: 0px;"><br></p><p class="p1" style="margin: 0px;" data-mce-style="margin: 0px;">And the filter MapLR2HR is called from TestMapping.cxx. It used to work on a Linux system. </p><p class="p1" style="margin: 0px;" data-mce-style="margin: 0px;">Here is a stackexchange answer I found </p><p class="p1" style="margin: 0px;" data-mce-style="margin: 0px;"><br></p><p class="p1" style="margin: 0px;" data-mce-style="margin: 0px;"><a href="http://stackoverflow.com/questions/20230412/undefined-symbols-for-architecture-x86-64-shared-util-library-build-with-cmake">http://stackoverflow.com/questions/20230412/undefined-symbols-for-architecture-x86-64-shared-util-library-build-with-cmake</a></p><p class="p1" style="margin: 0px;" data-mce-style="margin: 0px;"><br></p><p class="p1" style="margin: 0px;" data-mce-style="margin: 0px;">So when I defined the function in the .h file itself the error disappeared. However, why this should happen for one particular function and not all the others. It should be consistent. So I am not able to figure that out. </p><p class="p1" style="margin: 0px;" data-mce-style="margin: 0px;"><br></p><p class="p1" style="margin: 0px;" data-mce-style="margin: 0px;">Thanks for all the help</p><p class="p1" style="margin: 0px;" data-mce-style="margin: 0px;"><br></p><p class="p1" style="margin: 0px;" data-mce-style="margin: 0px;">Vikash</p><p class="p1" style="margin: 0px;" data-mce-style="margin: 0px;"> </p></div><div><br></div><hr id="zwchr"><blockquote style="border-left:2px solid #1010FF;margin-left:5px;padding-left:5px;color:#000;font-weight:normal;font-style:normal;text-decoration:none;font-family:Helvetica,Arial,sans-serif;font-size:12pt;" data-mce-style="border-left: 2px solid #1010FF; margin-left: 5px; padding-left: 5px; color: #000; font-weight: normal; font-style: normal; text-decoration: none; font-family: Helvetica,Arial,sans-serif; font-size: 12pt;"><b>From: </b>"Matt McCormick" <matt.mccormick@kitware.com><br><b>To: </b>"Vikash Gupta" <vikash.gupta@inria.fr><br><b>Cc: </b>"Sean McBride" <sean@rogue-research.com>, "insight-users@itk org" <insight-users@itk.org><br><b>Sent: </b>Friday, July 3, 2015 2:41:49 AM<br><b>Subject: </b>Re: [ITK-users] Problems with writing filter using Xcode<br><div><br></div><div dir="ltr"><div><div><div>Hi Vikash,<br><div><br></div></div>What does your CMakeLists.txt look like? Are all executables created added in the CMakeLists.txt file with the add_executable and target_link_libraries command?<br><div><br></div></div>Thanks,<br></div>Matt<br></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Jul 3, 2015 at 3:51 AM, Vikash Gupta <span dir="ltr"><<a href="mailto:vikash.gupta@inria.fr" target="_blank" data-mce-href="mailto:vikash.gupta@inria.fr">vikash.gupta@inria.fr</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex" data-mce-style="margin: 0 0 0 .8ex; border-left: 1px #ccc solid; padding-left: 1ex;">Hey guys,<br> So, I moved to a different IDE (Eclipse). I am still getting similar error.<br> <br> Here is the error<br> <span class=""><br> Undefined symbols for architecture x86_64:<br> </span> "itk::MapLR2HRFilter<itk::Image<float, 3u> >::SetTransform(itk::SmartPointer<itk::AffineTransform<double, 3u> >)", referenced from:<br> _main in testMapping.o<br> <span class="">ld: symbol(s) not found for architecture x86_64<br> clang: error: linker command failed with exit code 1 (use -v to see invocation)<br> <br> </span>After some googling i figured its a problem with OS X. I wonder if anyone knows how to fix it.<br> <br> <br> Thanks<br> <span class="im HOEnZb">Vikash<br> <br> ----- Original Message -----<br> > From: "Vikash Gupta" <<a href="mailto:vikash.gupta@inria.fr" target="_blank" data-mce-href="mailto:vikash.gupta@inria.fr">vikash.gupta@inria.fr</a>><br> > To: "Sean McBride" <<a href="mailto:sean@rogue-research.com" target="_blank" data-mce-href="mailto:sean@rogue-research.com">sean@rogue-research.com</a>><br> > Cc: "insight-users@itk org" <<a href="mailto:insight-users@itk.org" target="_blank" data-mce-href="mailto:insight-users@itk.org">insight-users@itk.org</a>><br> </span><div class="HOEnZb"><div class="h5">> Sent: Thursday, July 2, 2015 1:19:21 PM<br> > Subject: Re: [ITK-users] Problems with writing filter using Xcode<br> ><br> > Ok I am updating it ...<br> ><br> > ----- Original Message -----<br> > > From: "Vikash Gupta" <<a href="mailto:vikash.gupta@inria.fr" target="_blank" data-mce-href="mailto:vikash.gupta@inria.fr">vikash.gupta@inria.fr</a>><br> > > To: "Sean McBride" <<a href="mailto:sean@rogue-research.com" target="_blank" data-mce-href="mailto:sean@rogue-research.com">sean@rogue-research.com</a>><br> > > Cc: "insight-users@itk org" <<a href="mailto:insight-users@itk.org" target="_blank" data-mce-href="mailto:insight-users@itk.org">insight-users@itk.org</a>><br> > > Sent: Thursday, July 2, 2015 1:16:44 PM<br> > > Subject: Re: [ITK-users] Problems with writing filter using Xcode<br> > ><br> > > Or maybe I am doing something wrong.. Here is what I am doing step by step<br> > ><br> > > 1. Build ITK as I would normally considering a UNIX machine<br> > > 2. Use a text editor to make the CMakeLists.txt and arrange my directories<br> > > 3. use ccmake -GXcode to generate my xcode project<br> > > 4. Open the Xcode project and write the filters I need.<br> > ><br> > ><br> > > Vikash<br> > ><br> > > ----- Original Message -----<br> > > > From: "Vikash Gupta" <<a href="mailto:vikash.gupta@inria.fr" target="_blank" data-mce-href="mailto:vikash.gupta@inria.fr">vikash.gupta@inria.fr</a>><br> > > > To: "Sean McBride" <<a href="mailto:sean@rogue-research.com" target="_blank" data-mce-href="mailto:sean@rogue-research.com">sean@rogue-research.com</a>><br> > > > Cc: "insight-users@itk org" <<a href="mailto:insight-users@itk.org" target="_blank" data-mce-href="mailto:insight-users@itk.org">insight-users@itk.org</a>><br> > > > Sent: Thursday, July 2, 2015 1:09:00 PM<br> > > > Subject: Re: [ITK-users] Problems with writing filter using Xcode<br> > > ><br> > > > Hi Sean,<br> > > > Yes I was using Xcode 6.xx But then I read on stackexchange that there is<br> > > > some bug with the xcode 6.xx so rolled back to 5.xx . Also I was<br> > > > wondering<br> > > > if the .txx is a good extension for the counterpart to the .h file.<br> > > ><br> > > > Vikash<br> > > ><br> > > > ----- Original Message -----<br> > > > > From: "Sean McBride" <<a href="mailto:sean@rogue-research.com" target="_blank" data-mce-href="mailto:sean@rogue-research.com">sean@rogue-research.com</a>><br> > > > > To: "Vikash Gupta" <<a href="mailto:vikash.gupta@inria.fr" target="_blank" data-mce-href="mailto:vikash.gupta@inria.fr">vikash.gupta@inria.fr</a>>, "insight-users@itk org"<br> > > > > <<a href="mailto:insight-users@itk.org" target="_blank" data-mce-href="mailto:insight-users@itk.org">insight-users@itk.org</a>><br> > > > > Sent: Thursday, July 2, 2015 1:05:04 PM<br> > > > > Subject: Re: [ITK-users] Problems with writing filter using Xcode<br> > > > ><br> > > > > On Thu, 2 Jul 2015 21:18:41 +0200, Vikash Gupta said:<br> > > > ><br> > > > > >I am using Mac OS X 10.10.3 and Xcode 5.1.1<br> > > > ><br> > > > > Maybe not the cause of your problem, but note that that's not a valid<br> > > > > combination. OS X 10.10.x requires Xcode 6.x (I forget exactly which).<br> > > > ><br> > > > > Cheers,<br> > > > ><br> > > > > --<br> > > > > ____________________________________________________________<br> > > > > Sean McBride, B. Eng <a href="mailto:sean@rogue-research.com" target="_blank" data-mce-href="mailto:sean@rogue-research.com">sean@rogue-research.com</a><br> > > > > Rogue Research <a href="http://www.rogue-research.com" rel="noreferrer" target="_blank" data-mce-href="http://www.rogue-research.com">www.rogue-research.com</a><br> > > > > Mac Software Developer Montréal, Québec, Canada<br> > > > ><br> > > > ><br> > > > ><br> > > > _____________________________________<br> > > > Powered by <a href="http://www.kitware.com" rel="noreferrer" target="_blank" data-mce-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" rel="noreferrer" target="_blank" data-mce-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> > > > <a href="http://www.kitware.com/products/protraining.php" rel="noreferrer" target="_blank" data-mce-href="http://www.kitware.com/products/protraining.php">http://www.kitware.com/products/protraining.php</a><br> > > ><br> > > > Please keep messages on-topic and check the ITK FAQ at:<br> > > > <a href="http://www.itk.org/Wiki/ITK_FAQ" rel="noreferrer" target="_blank" data-mce-href="http://www.itk.org/Wiki/ITK_FAQ">http://www.itk.org/Wiki/ITK_FAQ</a><br> > > ><br> > > > Follow this link to subscribe/unsubscribe:<br> > > > <a href="http://public.kitware.com/mailman/listinfo/insight-users" rel="noreferrer" target="_blank" data-mce-href="http://public.kitware.com/mailman/listinfo/insight-users">http://public.kitware.com/mailman/listinfo/insight-users</a><br> > > ><br> > > _____________________________________<br> > > Powered by <a href="http://www.kitware.com" rel="noreferrer" target="_blank" data-mce-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" rel="noreferrer" target="_blank" data-mce-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> > > <a href="http://www.kitware.com/products/protraining.php" rel="noreferrer" target="_blank" data-mce-href="http://www.kitware.com/products/protraining.php">http://www.kitware.com/products/protraining.php</a><br> > ><br> > > Please keep messages on-topic and check the ITK FAQ at:<br> > > <a href="http://www.itk.org/Wiki/ITK_FAQ" rel="noreferrer" target="_blank" data-mce-href="http://www.itk.org/Wiki/ITK_FAQ">http://www.itk.org/Wiki/ITK_FAQ</a><br> > ><br> > > Follow this link to subscribe/unsubscribe:<br> > > <a href="http://public.kitware.com/mailman/listinfo/insight-users" rel="noreferrer" target="_blank" data-mce-href="http://public.kitware.com/mailman/listinfo/insight-users">http://public.kitware.com/mailman/listinfo/insight-users</a><br> > ><br> > _____________________________________<br> > Powered by <a href="http://www.kitware.com" rel="noreferrer" target="_blank" data-mce-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" rel="noreferrer" target="_blank" data-mce-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> > <a href="http://www.kitware.com/products/protraining.php" rel="noreferrer" target="_blank" data-mce-href="http://www.kitware.com/products/protraining.php">http://www.kitware.com/products/protraining.php</a><br> ><br> > Please keep messages on-topic and check the ITK FAQ at:<br> > <a href="http://www.itk.org/Wiki/ITK_FAQ" rel="noreferrer" target="_blank" data-mce-href="http://www.itk.org/Wiki/ITK_FAQ">http://www.itk.org/Wiki/ITK_FAQ</a><br> ><br> > Follow this link to subscribe/unsubscribe:<br> > <a href="http://public.kitware.com/mailman/listinfo/insight-users" rel="noreferrer" target="_blank" data-mce-href="http://public.kitware.com/mailman/listinfo/insight-users">http://public.kitware.com/mailman/listinfo/insight-users</a><br> ><br> _____________________________________<br> Powered by <a href="http://www.kitware.com" rel="noreferrer" target="_blank" data-mce-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" rel="noreferrer" target="_blank" data-mce-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> <a href="http://www.kitware.com/products/protraining.php" rel="noreferrer" target="_blank" data-mce-href="http://www.kitware.com/products/protraining.php">http://www.kitware.com/products/protraining.php</a><br> <br> Please keep messages on-topic and check the ITK FAQ at:<br> <a href="http://www.itk.org/Wiki/ITK_FAQ" rel="noreferrer" target="_blank" data-mce-href="http://www.itk.org/Wiki/ITK_FAQ">http://www.itk.org/Wiki/ITK_FAQ</a><br> <br> Follow this link to subscribe/unsubscribe:<br> <a href="http://public.kitware.com/mailman/listinfo/insight-users" rel="noreferrer" target="_blank" data-mce-href="http://public.kitware.com/mailman/listinfo/insight-users">http://public.kitware.com/mailman/listinfo/insight-users</a><br></div></div></blockquote></div><br></div></blockquote><div><br></div></div></body></html>