<p>Hi Florian,<br>
If it build without problem, did you try using a debugger to try to understand what s wrong?<br>
Jc</p>
<p>--<br>
Sent from my mobile device</p>
<div class="gmail_quote">On Aug 23, 2013 12:00 PM, "Florian Ganglberger" <<a href="mailto:Florian.Ganglberger@student.i-med.ac.at">Florian.Ganglberger@student.i-med.ac.at</a>> wrote:<br type="attribution">
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><span style="font-family:arial,sans-serif;font-size:13px">Hi,</span><div style="font-family:arial,sans-serif;font-size:13px">
we are trying to link a shared library to connect to tracker from a plugin. We know, that the code that calls the .so library works in a test application and also in the main method of our CTK application. After we have added our code to the plugin and linked it to the .so library, we can link and compile the code without errors, but we don't get a connection to the tracker. </div>

<div style="font-family:arial,sans-serif;font-size:13px">The cmakelists code to link the .so file in our test application is</div><div style="font-family:arial,sans-serif;font-size:13px">TARGET_LINK_LIBRARIES(optoExtern ${OPTOTRAK_LIBRARY})</div>

<div style="font-family:arial,sans-serif;font-size:13px">(${OPTOTRAK_LIBRARY} is the library path, optoExtern the project name)</div><div style="font-family:arial,sans-serif;font-size:13px"><br></div><div style="font-family:arial,sans-serif;font-size:13px">

The cmakelists code to link the .so file in our plugin:</div><div style="font-family:arial,sans-serif;font-size:13px"><div>ctkMacroBuildPlugin(</div><div>  NAME ${PROJECT_NAME}</div><div>  EXPORT_DIRECTIVE ${PLUGIN_export_directive}</div>

<div>  SRCS ${PLUGIN_SRCS}</div><div>  MOC_SRCS ${PLUGIN_MOC_SRCS}</div><div>  UI_FORMS ${PLUGIN_UI_FORMS}</div><div>  INCLUDE_DIRECTORIES ${Plugin_SOURCE_DIR}</div><div>  RESOURCES ${PLUGIN_resources}</div><div>  TARGET_LIBRARIES ${PLUGIN_target_libraries} ${OPTOTRAK_LIBRARY}</div>

<div>)</div><div><br></div><div>Has anyone an idea how to link external shared libraries within a plugin properly?</div><div><br></div><div>Best regards,</div><div>Florian Ganglberger</div></div></div>
<br>_______________________________________________<br>
Ctk-developers mailing list<br>
<a href="mailto:Ctk-developers@commontk.org">Ctk-developers@commontk.org</a><br>
<a href="http://public.kitware.com/cgi-bin/mailman/listinfo/ctk-developers" target="_blank">http://public.kitware.com/cgi-bin/mailman/listinfo/ctk-developers</a><br>
<br></blockquote></div>