[Rtk-users] RTK helloworld

Julien Jomier julien.jomier at kitware.com
Mon Sep 8 09:32:47 EDT 2014


I'm guessing the ITK shared libs cannot be found. Can you specify the 
path where the ITK libraries (.so) are located in the LD_LIBRARY_PATH 
before your run make?

Julien

On 08/09/2014 15:23, Padraig Looney wrote:
> It has successfully compiled using ccmake and make. I presume that has
> successfully linked it. The errors were produced with make.
>
> Both the SharedLibs variables are set to ON.
>
> I've tried building RTK two different ways. Once by allowing cmake to
> find ITK. This way ITK_DIR is set to /usr/local/lib/cmake/ITK-4.6
>
> The other way I built it was by setting ITK_DIR to be the location of
> the build directory. Which is what I understand from the wiki
>
> "When CMake asks for the ITK_DIR, specify the binary directory where ITK
> is built and choose CMAKE_BUILD_TYPE (default: Release)"
>
> It didn't make any difference though.
>
> On Mon, Sep 8, 2014 at 2:11 PM, Julien Jomier <julien.jomier at kitware.com
> <mailto:julien.jomier at kitware.com>> wrote:
>
>     Dear Padraig,
>
>     When you say "built and is working but I have hundreds of errors" do
>     you mean that you have successfully compiled and linked the example?
>     It seems that your example cannot find the ITK libraries. Are you
>     building ITK and RTK using BUILD_SHARED_LIBS to ON in CMake?
>
>     Julien
>
>
>     On 08/09/2014 14:43, Padraig Looney wrote:
>
>         Dear all,
>
>         I am trying to get the HelloWorld example running but I get a large
>         number of errors after the build. I am using ITK-4.6 and have
>         followed
>         the instructions as per
>
>         http://wiki.openrtk.org/index.__php/RTK_wiki_help#Tutorial_0_-___Building_an_HelloWorld___application_with_RTK
>         <http://wiki.openrtk.org/index.php/RTK_wiki_help#Tutorial_0_-_Building_an_HelloWorld_application_with_RTK>
>
>         My executable is built and is working but I have hundreds of
>         errors. The
>         first few are.
>
>         CMakeFiles/HelloWorld1.dir/__main.cpp.o: In function
>         `itk::MemoryAllocationError::__MemoryAllocationError(std::__string
>         const&,
>         unsigned int, std::string const&, std::string const&)':
>         main.cpp:(.text.___ZN3itk21MemoryAllocationErrorC__2ERKSsjS2_S2_[___ZN3itk21MemoryAllocationErrorC__5ERKSsjS2_S2_]+0x35):
>         undefined reference to
>         `itk::ExceptionObject::__ExceptionObject(std::string const&,
>         unsigned int,
>         std::string const&, std::string const&)'
>         main.cpp:(.text.___ZN3itk21MemoryAllocationErrorC__2ERKSsjS2_S2_[___ZN3itk21MemoryAllocationErrorC__5ERKSsjS2_S2_]+0x40):
>         undefined reference to `vtable for itk::MemoryAllocationError'
>         CMakeFiles/HelloWorld1.dir/__main.cpp.o: In function
>         `itk::Object::SetObjectName(__std::string)':
>         main.cpp:(.text.___ZN3itk6Object13SetObjectNameES__s[___ZN3itk6Object13SetObjectNameES__s]+0x25):
>         undefined reference to `itk::Object::GetDebug() const'
>         main.cpp:(.text.___ZN3itk6Object13SetObjectNameES__s[___ZN3itk6Object13SetObjectNameES__s]+0x2e):
>         undefined reference to `itk::Object::__GetGlobalWarningDisplay()'
>         main.cpp:(.text.___ZN3itk6Object13SetObjectNameES__s[___ZN3itk6Object13SetObjectNameES__s]+0x12e):
>         undefined reference to
>         `itk::__OutputWindowDisplayDebugText(__char const*)'
>         CMakeFiles/HelloWorld1.dir/__main.cpp.o: In function
>         `itk::DataObject::__SetRealTimeStamp(itk::__RealTimeStamp)':
>         main.cpp:(.text.___ZN3itk10DataObject16SetRealTim__eStampENS_13RealTimeStampE[___ZN3itk10DataObject16SetRealTim__eStampENS_13RealTimeStampE]+__0x25):
>         undefined reference to `itk::Object::GetDebug() const'
>         main.cpp:(.text.___ZN3itk10DataObject16SetRealTim__eStampENS_13RealTimeStampE[___ZN3itk10DataObject16SetRealTim__eStampENS_13RealTimeStampE]+__0x2e):
>         undefined reference to `itk::Object::__GetGlobalWarningDisplay()'
>         main.cpp:(.text.___ZN3itk10DataObject16SetRealTim__eStampENS_13RealTimeStampE[___ZN3itk10DataObject16SetRealTim__eStampENS_13RealTimeStampE]+__0xf1):
>         undefined reference to `itk::operator<<(std::ostream&__,
>         itk::RealTimeStamp const&)'
>         main.cpp:(.text.___ZN3itk10DataObject16SetRealTim__eStampENS_13RealTimeStampE[___ZN3itk10DataObject16SetRealTim__eStampENS_13RealTimeStampE]+__0x12e):
>         undefined reference to
>         `itk::__OutputWindowDisplayDebugText(__char const*)'
>         main.cpp:(.text.___ZN3itk10DataObject16SetRealTim__eStampENS_13RealTimeStampE[___ZN3itk10DataObject16SetRealTim__eStampENS_13RealTimeStampE]+__0x169):
>         undefined reference to
>         `itk::RealTimeStamp::operator!__=(itk::RealTimeStamp const&) const'
>
>
>         Thanks
>         Pádraig
>
>
>         _________________________________________________
>         Rtk-users mailing list
>         Rtk-users at public.kitware.com <mailto:Rtk-users at public.kitware.com>
>         http://public.kitware.com/__mailman/listinfo/rtk-users
>         <http://public.kitware.com/mailman/listinfo/rtk-users>
>
>



More information about the Rtk-users mailing list