[Insight-users] Cmake Linking Object Error: undefined reference
Abayiz
abayiz at yahoo.com
Wed Nov 23 12:51:38 EST 2011
Hello Cagatay,
Thank you for your reply.
I found the problem was in the ".txx" file, one sentence was incorrectly written in the function definition. So it worked now.
Thanks again,
Abayiz
________________________________
From: cagatay bilgin <bilgincc at gmail.com>
To: Abayiz <abayiz at yahoo.com>
Cc: David Doria <daviddoria at gmail.com>; itk <insight-users at itk.org>
Sent: Tuesday, November 22, 2011 1:39 AM
Subject: Re: [Insight-users] Cmake Linking Object Error: undefined reference
Hi Abayiz,
The difference that Bill suggested is the line:ADD_EXECUTABLE( VavSegment VavSegment.cxx)
If you have the headers and includes properly setup, this
is the easiest way to add an executable. Please take a
look here and make sure you have a similar include,
define and ifndef setup both at the header and the hxx
file as well as the templates and such before your
implementation in the hxx files. Without seeing your
code it is impossible to enumerate all the things that could
be going wrong.
http://www.vtk.org/Wiki/ITK/Examples/Developer/ImageSource
Let us know,
Cagatay
On Sun, Nov 20, 2011 at 11:47 PM, Abayiz <abayiz at yahoo.com> wrote:
Hello David and Bill,
>
>
>Thank you for your replies.
>
>
>
>I tried the CMakeList that Bill said, which I think is similar to Cagatay's, and it didn't work.
>
>And, I declared "SetThirdAdvectionFunction" in "VavBoneSegmentationLevelSetImageFilter.h", while giving its implementation in the corresponding "VavBoneSegmentationLevelSetImageFilter.txx". I've done this kind of work before, and they worked quite well, but when I did it exactly the same manner again, it failed.
>
>
>
>Regards,
>
>Abayiz
>
>
>________________________________
> From: David Doria <daviddoria at gmail.com>
>To: Abayiz <abayiz at yahoo.com>
>Cc: itk <insight-users at itk.org>
>Sent: Sunday, November 20, 2011 8:24 PM
>
>Subject: Re: [Insight-users] Cmake Linking Object Error: undefined reference
>
>
>On Sun, Nov 20, 2011 at 1:20 PM, Abayiz <abayiz at yahoo.com> wrote:
>> Hello Cagatay,
>> Thank you very much for your answer.
>> I am using ITK4, so tried as you said, changing the link libraries line in
>> CMake. But it didn't work, still giving the same error.
>> And, I've defined "SetThirdAdvectionFunction" in
>> "VavBoneSegmentationLevelSetImageFilter.h" clearly, I am sure this is not
>> the error point.
>>
>> Are there any other suggestions?
>>
>> Thanks,
>> Abayiz
>
>I suggest you make the smallest possible compilable example of your
>problem so we can try to reproduce the error. I agree with Cagatay
>that SetThirdAdvectionFunction is either not defined, or the file it
>is defined in is not compiled. You said you defined it in
>VavBoneSegmentationLevelSetImageFilter.h - are you sure
the
>implementation (definition) is there, and not just the declaration?
>
>David
>
>
>
>_____________________________________
>Powered by www.kitware.com
>
>Visit other Kitware open-source projects at
>http://www.kitware.com/opensource/opensource.html
>
>Kitware offers ITK Training Courses, for more information visit:
>http://www.kitware.com/products/protraining.html
>
>Please keep messages on-topic and check the ITK FAQ at:
>http://www.itk.org/Wiki/ITK_FAQ
>
>Follow this link to subscribe/unsubscribe:
>http://www.itk.org/mailman/listinfo/insight-users
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.itk.org/pipermail/insight-users/attachments/20111123/2df908ec/attachment.htm>
More information about the Insight-users
mailing list