<div dir="ltr">Hi <span style="font-family:arial,sans-serif;font-size:13.333333969116211px">Brad</span>,<div>I made the appropriate changes to all CMakeLists.txt files according to [1] but I still get the same error when I link the external project to ITK libraries. <br>
<div><div>I also tried NOT to create a separate <span style="font-family:arial,sans-serif;font-size:13.333333969116211px"><i style="font-weight:bold">libitkv3p_laspack </i>but to include laspack into the </span><font face="arial, sans-serif"><b><i>itkv3p_netlib</i></b></font>  (like the SPARSE package) and I still get the same link error.</div>
<div>After spending several days on the LASPack integration I am not sure why I get this link error... </div></div></div><div><br></div><div>[1] <a href="https://github.com/chuckatkins/ITK/commit/2c773edc695cbe7b907bebf356ee14e0af66b01a" target="_blank" style="font-size:13.333333969116211px;font-family:arial,sans-serif">https://github.com/chuckatkins/ITK/commit/2c773edc695cbe7b907bebf356ee14e0af66b01a</a><br>
</div><div><br></div><div>Best,</div><div>Fotis</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Fri, Jul 25, 2014 at 3:44 PM, Bradley Lowekamp <span dir="ltr"><<a href="mailto:blowekamp@mail.nih.gov" target="_blank">blowekamp@mail.nih.gov</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word">Hello,<div><br></div><div>I am not certain but I just was looking around at a few things and found some work related to ITKv4 Numerics Refactors[1] here on github that's a bit out dated:</div>
<div><a href="https://github.com/chuckatkins/ITK/commits/numlibs_refactor" target="_blank">https://github.com/chuckatkins/ITK/commits/numlibs_refactor</a></div><div><br></div><div>Looks like similar work and my first search reveals this may be of use:</div>
<div><a href="https://github.com/chuckatkins/ITK/commit/2c773edc695cbe7b907bebf356ee14e0af66b01a" target="_blank">https://github.com/chuckatkins/ITK/commit/2c773edc695cbe7b907bebf356ee14e0af66b01a</a></div><div><br></div>
<div>Brad</div><div><br></div><div>[1] <a href="http://www.itk.org/Wiki/ITK_Release_4/Refactor_Numerical_Libraries" target="_blank">http://www.itk.org/Wiki/ITK_Release_4/Refactor_Numerical_Libraries</a></div><div><br><div>
<div><div class="h5"><div>On Jul 25, 2014, at 3:32 PM, Fotis Drakopoulos <<a href="mailto:fdrakopo@gmail.com" target="_blank">fdrakopo@gmail.com</a>> wrote:</div><br></div></div><blockquote type="cite"><div><div class="h5">
<div dir="ltr">Hi ITK developers,<div><br></div><div>I am working on the integration of the LASPack package (<a href="http://www.netlib.org/linalg/" target="_blank">http://www.netlib.org/linalg/</a>) inside the ITK for solving for solving large sparse systems of linear equations with iterative methods.</div>

<div>I created a new folder with name laspack under the directory : Modules/ThirdParty/VNL/src/vxl/v3p/netlib/ with the following CMakeList.txt :</div><div><div><br></div><div><i>PROJECT( laspack )</i></div><div><i><br></i></div>

<div><i># List sources for each library component.</i></div><div><i>SET(V3P_NETLIB_laspack_SOURCES</i></div><div><i>    eigenval.c</i></div><div><i>    errhandl.c</i></div><div><i>    factor.c</i></div><div><i>    itersolv.c</i></div>

<div><i>    matrix.c</i></div><div><i>    mlsolv.c</i></div><div><i>    operats.c</i></div><div><i>    precond.c</i></div><div><i>    qmatrix.c</i></div><div><i>    rtc.c</i></div><div><i>    vector.c</i></div><div><i>    eigenval.h</i></div>

<div><i>    elcmp.h</i></div><div><i>    errhandl.h</i></div><div><i>    factor.h</i></div><div><i>    itersolv.h</i></div><div><i>    lastypes.h</i></div><div><i>    matrix.h</i></div><div><i>    mlsolv.h</i></div><div>
<i>    operats.h</i></div>
<div><i>    precond.h</i></div><div><i>    qmatrix.h</i></div><div><i>    rtc.h</i></div><div><i>    vector.h</i></div><div><i>    version.h</i></div><div><i>    copyrght.h</i></div><div><i>    xc/getopts.c</i></div><div>

<i>    xc/xstring.c</i></div><div><i>    xc/getopts.h</i></div><div><i>    xc/version.h</i></div><div><i>    xc/xstring.h</i></div><div><i>    xc/xtypes.h</i></div><div><i>  )</i></div><div><i><br></i></div><div><i># Create a library .</i></div>

<div><i>ADD_LIBRARY(itkv3p_laspack ${V3P_NETLIB_laspack_SOURCES})</i></div><div><i>IF(UNIX)</i></div><div><i>  TARGET_LINK_LIBRARIES( itkv3p_laspack m )</i></div><div><i>ENDIF(UNIX)</i></div><div><i>IF(ITK_LIBRARY_PROPERTIES)</i></div>

<div><i>  SET_TARGET_PROPERTIES(itkv3p_laspack PROPERTIES ${ITK_LIBRARY_PROPERTIES})</i></div><div><i>ENDIF(ITK_LIBRARY_PROPERTIES)</i></div><div><i><br></i></div><div><i>IF(NOT VXL_INSTALL_NO_LIBRARIES)</i></div><div><i>  INSTALL(TARGETS itkv3p_laspack</i></div>

<div><i>    EXPORT ${VXL_INSTALL_EXPORT_NAME}</i></div><div><i>    RUNTIME DESTINATION ${VXL_INSTALL_RUNTIME_DIR} COMPONENT RuntimeLibraries</i></div><div><i>    LIBRARY DESTINATION ${VXL_INSTALL_LIBRARY_DIR} COMPONENT RuntimeLibraries</i></div>

<div><i>    ARCHIVE DESTINATION ${VXL_INSTALL_ARCHIVE_DIR} COMPONENT Development)</i></div><div><i>ENDIF(NOT VXL_INSTALL_NO_LIBRARIES)</i></div><div><i>IF(NOT VXL_INSTALL_NO_DEVELOPMENT)</i></div><div><i>  INSTALL_NOBASE_HEADER_FILES(${VXL_INSTALL_INCLUDE_DIR} ${V3P_NETLIB_laspack_SOURCES})</i></div>

<div><i>ENDIF(NOT VXL_INSTALL_NO_DEVELOPMENT)</i></div></div><div><br></div><div>Also in the CMakeLists.txt located in direcory : Modules/ThirdParty/VNL/src I added the new <i><b>itkv3p_laspack</b></i> library as follows: </div>

<div><br></div><div><div><i>add_subdirectory(vxl)</i></div><div><i>foreach(lib itkvcl itkv3p_netlib itkv3p_lsqr <b>itkv3p_laspack</b> itktestlib itkvnl itkvnl_algo)</i></div><div><i>  itk_module_target(${lib} NO_INSTALL)</i></div>

<div><i>endforeach()</i></div></div><div><br></div><div>When I build ITK I do not get any errors and the <b><i>libitkv3p_laspack. a</i></b>  is normally created like all the other ITK libraries.</div><div>However when I compile an external project which links to ITK with TARGET_LINK_LIBRARIES(PROJECT_NAME ${ITK_LIBRARIES}),   I am getting the following link error:</div>

<div><br></div><div><i>/home/fdrakopo/local/bin/ITKDev/release/lib/libitkvnl_algo-4.1.a(vnl_sparse_iterative_solver.cxx.o): In function `vnl_sparse_iterative_solver::vnl_sparse_iterative_solver(vnl_sparse_matrix<double> const&)':</i></div>

<div><i>vnl_sparse_iterative_solver.cxx:(.text+0x6a): undefined reference to `Q_SetName(QMatrixType*, char*)'</i></div><div><i>collect2: error: ld returned 1 exit status</i></div><div><i>make[2]: *** [PAPBNRR] Error 1</i></div>

<div><i>make[1]: *** [CMakeFiles/PAPBNRR.dir/all] Error 2</i></div><div><i>make: *** [all] Error 2</i></div><div> </div><div>The vnl_sparse_iterative_solver is a new class I created under : Modules/ThirdParty/VNL/src/vxl/core/vnl/algo </div>

<div>and encapsulates the implemented calls (functions, etc.) to the LASPack package (similarly to vnl_sparse_lu class that calls Kenneth's Kundert SPARSE package).</div><div>Also the itkvnl_algo inks to itkv3p_laspack :</div>

<div><i>TARGET_LINK_LIBRARIES( itkvnl_algo ${NETLIB_LIBRARIES} itkvnl itkv3p_lsqr <b>itkv3p_laspack</b> ) </i></div><div><br></div><div>Any ideas how can I solve the above link error?</div><div><br></div><div>Regards,</div>

<div>Fotis Drakopoulos</div><div>CRTC lab</div><div><br></div></div></div></div>
_______________________________________________<br>Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br><br>Visit other Kitware open-source projects at<br><a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>Kitware offers ITK Training Courses, for more information visit:<br><a href="http://kitware.com/products/protraining.php" target="_blank">http://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" target="_blank">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-developers" target="_blank">http://public.kitware.com/mailman/listinfo/insight-developers</a><br>
</blockquote></div><br></div>

<div><span style="font-size:medium;color:black;font-style:normal;font-weight:normal;background-color:white;display:inline">
<hr>

<br>

<a href="https://www.spamtrap.odu.edu/canit/b.php?i=02MuHJuoo&m=974aceda4769&t=20140725&c=s" target="_blank">Spam</a><br>

<a href="https://www.spamtrap.odu.edu/canit/b.php?i=02MuHJuoo&m=974aceda4769&t=20140725&c=n" target="_blank">Not spam</a><br>

<a href="https://www.spamtrap.odu.edu/canit/b.php?i=02MuHJuoo&m=974aceda4769&t=20140725&c=f" target="_blank">Forget previous vote</a><br></span></div>


</div></blockquote></div><br></div>