<div dir="ltr"><br><br><div class="gmail_quote"><div dir="ltr">---------- Forwarded message ---------<br>From: <strong class="gmail_sendername" dir="auto">Eric Noulard</strong> <span dir="ltr"><<a href="mailto:eric.noulard@gmail.com">eric.noulard@gmail.com</a>></span><br>Date: mer. 15 août 2018 à 17:13<br>Subject: Re: [CMake] Problem with creating shared library<br>To: <<a href="mailto:damir_porobic@live.com">damir_porobic@live.com</a>><br></div><br><br><div dir="ltr">May be check the list of symbol in the lib.<div><span style="color:rgb(0,0,0);font-family:Consolas,Courier,monospace;font-size:16px">KImageAnnotator::</span><span style="color:rgb(0,0,0);font-family:Consolas,Courier,monospace;font-size:16px">KImageAnnotator(QPixmap const&)</span><br></div>may really not be there (only declared in some header and not defined anywhere).<br><br>Does the <span style="color:rgb(0,0,0);font-family:Consolas,Courier,monospace;font-size:16px">KImageAnnotator</span> library have unit tests in its project?<div>If no executable linked to the ilb you won't discover the link error until you try to link something to the lib.</div><div><br></div>This is a kind wild guess, don't take it personally :-)</div><br><div class="gmail_quote"><div dir="ltr">Le mer. 15 août 2018 à 16:21, Damir Porobic <<a href="mailto:damir_porobic@live.com">damir_porobic@live.com</a>> a écrit :<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir="ltr">
<div id="m_1211585348752899202divtagdefaultwrapper" style="font-size:12pt;color:#000000;font-family:Calibri,Helvetica,sans-serif" dir="ltr">
<p style="margin-top:0;margin-bottom:0">Thanks for the feedback.</p>
<p style="margin-top:0;margin-bottom:0"><br>
</p>
<p style="margin-top:0;margin-bottom:0">It looks like this line is failing:</p>
<p style="margin-top:0;margin-bottom:0"><span style="font-family:Consolas,Courier,monospace">/usr/bin/c++ -std=c++0x -fno-operator-names -fno-exceptions -Wall -Wextra -Wcast-align -Wchar-subscripts -Wformat-security -Wno-long-long -Wpointer-arith -Wundef
-Wnon-virtual-dtor -Woverloaded-virtual -Werror=return-type -Wl,--enable-new-dtags CMakeFiles/testApp.dir/main.cpp.o CMakeFiles/testApp.dir/testApp_automoc.cpp.o -o testApp /usr/local/lib64/libkImageAnnotator.so.0.0.1 /usr/lib64/libKF5CoreAddons.so.5.32.0
/usr/lib64/libKF5I18n.so.5.32.0 /usr/lib64/libKF5WidgetsAddons.so.5.32.0 /usr/lib64/libQt5Widgets.so.5.6.2 /usr/lib64/libQt5Gui.so.5.6.2 /usr/lib64/libQt5Core.so.5.6.2 -Wl,-rpath,/usr/local/lib64</span><br>
</p>
<br>
<p style="margin-top:0;margin-bottom:0">The lib at <span style="font-family:Consolas,Courier,monospace">
/usr/local/lib64/libkImageAnnotator.so.0.0.1</span> seems to be correct, according to the
<span style="font-family:Consolas,Courier,monospace">sudo </span><span style="font-family:Consolas,Courier,monospace">make install</span> output from the lib</p>
<p style="margin-top:0;margin-bottom:0"><br>
</p>
<p style="margin-top:0;margin-bottom:0"><span style="font-family:Consolas,Courier,monospace"></span></p>
<div><span style="font-family:Consolas,Courier,monospace">Install the project...</span><br>
<span style="font-family:Consolas,Courier,monospace">-- Install configuration: "Debug"</span><br>
<span style="font-family:Consolas,Courier,monospace">-- Installing: /usr/local/lib64/libkImageAnnotator.so.0.0.1</span><br>
<span style="font-family:Consolas,Courier,monospace">-- Installing: /usr/local/lib64/libkImageAnnotator.so.1</span><br>
<span style="font-family:Consolas,Courier,monospace">-- Set runtime path of "/usr/local/lib64/libkImageAnnotator.so.0.0.1" to "/usr/local/lib64"</span><br>
<span style="font-family:Consolas,Courier,monospace">-- Installing: /usr/local/lib64/libkImageAnnotator.so</span></div>
<div><span style="font-family:Consolas,Courier,monospace">...</span></div>
<div><span style="font-family:Consolas,Courier,monospace">
<div>-- Installing: /usr/local/share/kImageAnnotatorConfig/cmake/kImageAnnotatorConfig.cmake<br>
-- Installing: /usr/local/share/kImageAnnotatorConfig/cmake/kImageAnnotatorConfig-debug.cmake<br>
<br>
</div>
<br>
</span></div>
<div><span style="font-family:Consolas,Courier,monospace"></span><br>
</div>
<span style="font-family:Arial,Helvetica,sans-serif"></span><span style="font-family:Calibri,Helvetica,sans-serif"></span><span style="font-family:Calibri,Helvetica,sans-serif">Don't know if this
</span>is OK, but it looks like the debug and the non-debug cmake versions are used:
<p></p>
<p style="margin-top:0;margin-bottom:0"><span style="font-family:Consolas,Courier,monospace"></span></p>
<div><span style="font-family:Consolas,Courier,monospace">/usr/local/share/kImageAnnotatorConfig/cmake/kImageAnnotatorConfig.cmake(3): if(${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION} LESS 2.5 )</span><br>
<span style="font-family:Consolas,Courier,monospace">/usr/local/share/kImageAnnotatorConfig/cmake/kImageAnnotatorConfig.cmake(6): cmake_policy(PUSH )</span><br>
<span style="font-family:Consolas,Courier,monospace">/usr/local/share/kImageAnnotatorConfig/cmake/kImageAnnotatorConfig.cmake(7): cmake_policy(VERSION 2.6 )</span><br>
<span style="font-family:Consolas,Courier,monospace">/usr/local/share/kImageAnnotatorConfig/cmake/kImageAnnotatorConfig.cmake(13): set(CMAKE_IMPORT_FILE_VERSION 1 )</span><br>
<span style="font-family:Consolas,Courier,monospace">/usr/local/share/kImageAnnotatorConfig/cmake/kImageAnnotatorConfig.cmake(16): set(_targetsDefined )</span><br>
<span style="font-family:Consolas,Courier,monospace">/usr/local/share/kImageAnnotatorConfig/cmake/kImageAnnotatorConfig.cmake(17): set(_targetsNotDefined )</span><br>
<span style="font-family:Consolas,Courier,monospace">/usr/local/share/kImageAnnotatorConfig/cmake/kImageAnnotatorConfig.cmake(18): set(_expectedTargets )</span><br>
<span style="font-family:Consolas,Courier,monospace">/usr/local/share/kImageAnnotatorConfig/cmake/kImageAnnotatorConfig.cmake(19): foreach(_expectedTarget kImageAnnotator )</span><br>
<span style="font-family:Consolas,Courier,monospace">/usr/local/share/kImageAnnotatorConfig/cmake/kImageAnnotatorConfig.cmake(20): list(APPEND _expectedTargets ${_expectedTarget} )</span><br>
<span style="font-family:Consolas,Courier,monospace">/usr/local/share/kImageAnnotatorConfig/cmake/kImageAnnotatorConfig.cmake(21): if(NOT TARGET ${_expectedTarget} )</span><br>
<span style="font-family:Consolas,Courier,monospace">/usr/local/share/kImageAnnotatorConfig/cmake/kImageAnnotatorConfig.cmake(22): list(APPEND _targetsNotDefined ${_expectedTarget} )</span><br>
<span style="font-family:Consolas,Courier,monospace">/usr/local/share/kImageAnnotatorConfig/cmake/kImageAnnotatorConfig.cmake(24): if(TARGET ${_expectedTarget} )</span><br>
<span style="font-family:Consolas,Courier,monospace">/usr/local/share/kImageAnnotatorConfig/cmake/kImageAnnotatorConfig.cmake(28): if(${_targetsDefined} STREQUAL ${_expectedTargets} )</span><br>
<span style="font-family:Consolas,Courier,monospace">/usr/local/share/kImageAnnotatorConfig/cmake/kImageAnnotatorConfig.cmake(36): if(NOT ${_targetsDefined} STREQUAL )</span><br>
<span style="font-family:Consolas,Courier,monospace">/usr/local/share/kImageAnnotatorConfig/cmake/kImageAnnotatorConfig.cmake(39): unset(_targetsDefined )</span><br>
<span style="font-family:Consolas,Courier,monospace">/usr/local/share/kImageAnnotatorConfig/cmake/kImageAnnotatorConfig.cmake(40): unset(_targetsNotDefined )</span><br>
<span style="font-family:Consolas,Courier,monospace">/usr/local/share/kImageAnnotatorConfig/cmake/kImageAnnotatorConfig.cmake(41): unset(_expectedTargets )</span><br>
<span style="font-family:Consolas,Courier,monospace">/usr/local/share/kImageAnnotatorConfig/cmake/kImageAnnotatorConfig.cmake(45): get_filename_component(_IMPORT_PREFIX ${CMAKE_CURRENT_LIST_FILE} PATH )</span><br>
<span style="font-family:Consolas,Courier,monospace">/usr/local/share/kImageAnnotatorConfig/cmake/kImageAnnotatorConfig.cmake(46): get_filename_component(_IMPORT_PREFIX ${_IMPORT_PREFIX} PATH )</span><br>
<span style="font-family:Consolas,Courier,monospace">/usr/local/share/kImageAnnotatorConfig/cmake/kImageAnnotatorConfig.cmake(47): get_filename_component(_IMPORT_PREFIX ${_IMPORT_PREFIX} PATH )</span><br>
<span style="font-family:Consolas,Courier,monospace">/usr/local/share/kImageAnnotatorConfig/cmake/kImageAnnotatorConfig.cmake(48): get_filename_component(_IMPORT_PREFIX ${_IMPORT_PREFIX} PATH )</span><br>
<span style="font-family:Consolas,Courier,monospace">/usr/local/share/kImageAnnotatorConfig/cmake/kImageAnnotatorConfig.cmake(49): if(_IMPORT_PREFIX STREQUAL / )</span><br>
<span style="font-family:Consolas,Courier,monospace">/usr/local/share/kImageAnnotatorConfig/cmake/kImageAnnotatorConfig.cmake(54): add_library(kImageAnnotator SHARED IMPORTED )</span><br>
<span style="font-family:Consolas,Courier,monospace">/usr/local/share/kImageAnnotatorConfig/cmake/kImageAnnotatorConfig.cmake(56): set_target_properties(kImageAnnotator PROPERTIES INTERFACE_INCLUDE_DIRECTORIES ${_IMPORT_PREFIX}/include INTERFACE_LINK_LIBRARIES
Qt5::Widgets;KF5::CoreAddons;KF5::I18n;KF5::WidgetsAddons )</span><br>
<span style="font-family:Consolas,Courier,monospace">/usr/local/share/kImageAnnotatorConfig/cmake/kImageAnnotatorConfig.cmake(61): if(CMAKE_VERSION VERSION_LESS 2.8.12 )</span><br>
<span style="font-family:Consolas,Courier,monospace">/usr/local/share/kImageAnnotatorConfig/cmake/kImageAnnotatorConfig.cmake(66): get_filename_component(_DIR ${CMAKE_CURRENT_LIST_FILE} PATH )</span><br>
<span style="font-family:Consolas,Courier,monospace">/usr/local/share/kImageAnnotatorConfig/cmake/kImageAnnotatorConfig.cmake(67): file(GLOB CONFIG_FILES ${_DIR}/kImageAnnotatorConfig-*.cmake )</span><br>
<span style="font-family:Consolas,Courier,monospace">/usr/local/share/kImageAnnotatorConfig/cmake/kImageAnnotatorConfig.cmake(68): foreach(f ${CONFIG_FILES} )</span><br>
<span style="font-family:Consolas,Courier,monospace">/usr/local/share/kImageAnnotatorConfig/cmake/kImageAnnotatorConfig.cmake(69): include(${f} )</span><br>
<span style="font-family:Consolas,Courier,monospace">/usr/local/share/kImageAnnotatorConfig/cmake/kImageAnnotatorConfig-debug.cmake(6): set(CMAKE_IMPORT_FILE_VERSION 1 )</span><br>
<span style="font-family:Consolas,Courier,monospace">/usr/local/share/kImageAnnotatorConfig/cmake/kImageAnnotatorConfig-debug.cmake(9): set_property(TARGET kImageAnnotator APPEND PROPERTY IMPORTED_CONFIGURATIONS DEBUG )</span><br>
<span style="font-family:Consolas,Courier,monospace">/usr/local/share/kImageAnnotatorConfig/cmake/kImageAnnotatorConfig-debug.cmake(10): set_target_properties(kImageAnnotator PROPERTIES IMPORTED_LOCATION_DEBUG ${_IMPORT_PREFIX}/lib64/libkImageAnnotator.so.0.0.1
IMPORTED_SONAME_DEBUG libkImageAnnotator.so.1 )</span><br>
<span style="font-family:Consolas,Courier,monospace">/usr/local/share/kImageAnnotatorConfig/cmake/kImageAnnotatorConfig-debug.cmake(15): list(APPEND _IMPORT_CHECK_TARGETS kImageAnnotator )</span><br>
<span style="font-family:Consolas,Courier,monospace">/usr/local/share/kImageAnnotatorConfig/cmake/kImageAnnotatorConfig-debug.cmake(16): list(APPEND _IMPORT_CHECK_FILES_FOR_kImageAnnotator ${_IMPORT_PREFIX}/lib64/libkImageAnnotator.so.0.0.1 )</span><br>
<span style="font-family:Consolas,Courier,monospace">/usr/local/share/kImageAnnotatorConfig/cmake/kImageAnnotatorConfig-debug.cmake(19): set(CMAKE_IMPORT_FILE_VERSION )</span><br>
<span style="font-family:Consolas,Courier,monospace">/usr/local/share/kImageAnnotatorConfig/cmake/kImageAnnotatorConfig.cmake(73): set(_IMPORT_PREFIX )</span><br>
<span style="font-family:Consolas,Courier,monospace">/usr/local/share/kImageAnnotatorConfig/cmake/kImageAnnotatorConfig.cmake(76): foreach(target ${_IMPORT_CHECK_TARGETS} )</span><br>
<span style="font-family:Consolas,Courier,monospace">/usr/local/share/kImageAnnotatorConfig/cmake/kImageAnnotatorConfig.cmake(77): foreach(file ${_IMPORT_CHECK_FILES_FOR_${target}} )</span><br>
<span style="font-family:Consolas,Courier,monospace">/usr/local/share/kImageAnnotatorConfig/cmake/kImageAnnotatorConfig.cmake(78): if(NOT EXISTS ${file} )</span><br>
<span style="font-family:Consolas,Courier,monospace">/usr/local/share/kImageAnnotatorConfig/cmake/kImageAnnotatorConfig.cmake(90): unset(_IMPORT_CHECK_FILES_FOR_${target} )</span><br>
<span style="font-family:Consolas,Courier,monospace">/usr/local/share/kImageAnnotatorConfig/cmake/kImageAnnotatorConfig.cmake(92): unset(_IMPORT_CHECK_TARGETS )</span><br>
<span style="font-family:Consolas,Courier,monospace">/usr/local/share/kImageAnnotatorConfig/cmake/kImageAnnotatorConfig.cmake(98): set(CMAKE_IMPORT_FILE_VERSION )</span><br>
<span style="font-family:Consolas,Courier,monospace">/usr/local/share/kImageAnnotatorConfig/cmake/kImageAnnotatorConfig.cmake(99): cmake_policy(POP )</span></div>
<div><br>
</div>
<div>It looks like the correct cmake files are used.</div>
<div><br>
</div>
<div>Any more ideas?</div>
<div><br>
</div>
<div>Regards,<br>
Damir<br>
</div>
<p></p>
<div style="color:rgb(49,54,59)">
<hr style="display:inline-block;width:98%">
<div id="m_1211585348752899202divRplyFwdMsg" dir="ltr"><font style="font-size:11pt" face="Calibri, sans-serif" color="#000000"><b>From:</b> Eric Noulard <<a href="mailto:eric.noulard@gmail.com" target="_blank">eric.noulard@gmail.com</a>><br>
<b>Sent:</b> Wednesday, August 15, 2018 12:18<br>
<b>To:</b> <a href="mailto:damir_porobic@live.com" target="_blank">damir_porobic@live.com</a><br>
<b>Cc:</b> CMake Mailinglist<br>
<b>Subject:</b> Re: [CMake] Problem with creating shared library</font>
<div> </div>
</div>
<div>
<div dir="ltr"><br>
<br>
<div class="m_1211585348752899202x_gmail_quote">
<div dir="ltr">Le mer. 15 août 2018 à 10:32, Damir Porobic <<a href="mailto:damir_porobic@live.com" id="m_1211585348752899202LPlnk825230" class="m_1211585348752899202OWAAutoLink" target="_blank">damir_porobic@live.com</a>> a écrit :<br>
</div>
<blockquote class="m_1211585348752899202x_gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir="ltr">
<div id="m_1211585348752899202x_m_-1589050174249929678divtagdefaultwrapper" dir="ltr" style="font-size:12pt;color:rgb(0,0,0);font-family:Calibri,Helvetica,sans-serif,"EmojiFont","Apple Color Emoji","Segoe UI Emoji",NotoColorEmoji,"Segoe UI Symbol","Android Emoji",EmojiSymbols">
<p style="margin-top:0;margin-bottom:0">Hi Folks,</p>
<p style="margin-top:0;margin-bottom:0"><br>
</p>
<p style="margin-top:0;margin-bottom:0">I'm trying to write a shared library and run into an issue where I can't find any clues to where the problem is.
<br>
<br>
I have a project with following structure:</p>
<p style="margin-top:0;margin-bottom:0"><br>
</p>
<p style="margin-top:0;margin-bottom:0"><span style="font-family:Consolas,Courier,monospace">src/</span></p>
<span style="font-family:Consolas,Courier,monospace"></span>
<p style="margin-top:0;margin-bottom:0"><span style="font-family:Consolas,Courier,monospace"> dir1/</span></p>
<span style="font-family:Consolas,Courier,monospace"></span>
<p style="margin-top:0;margin-bottom:0"><span style="font-family:Consolas,Courier,monospace"> file1.h</span><br>
<span style="font-family:Consolas,Courier,monospace"></span></p>
<span style="font-family:Consolas,Courier,monospace"></span>
<p style="margin-top:0;margin-bottom:0"><span style="font-family:Consolas,Courier,monospace"> file1.cpp</span></p>
<span style="font-family:Consolas,Courier,monospace"></span>
<p style="margin-top:0;margin-bottom:0"><span></span></p>
<span style="font-family:Consolas,Courier,monospace"></span>
<p style="margin-top:0;margin-bottom:0"><span style="font-family:Consolas,Courier,monospace"> dir2/</span></p>
<span style="font-family:Consolas,Courier,monospace"></span>
<p style="margin-top:0;margin-bottom:0"><span style="font-family:Consolas,Courier,monospace"> file2.h</span><br>
<span style="font-family:Consolas,Courier,monospace"></span></p>
<span style="font-family:Consolas,Courier,monospace"></span><span style="font-family:Consolas,Courier,monospace"> file2.cpp</span>
<p></p>
<p style="margin-top:0;margin-bottom:0"><span><span><br>
</span></span></p>
<p style="margin-top:0;margin-bottom:0"><span><span><br>
</span></span></p>
<p style="margin-top:0;margin-bottom:0"><span><span>Now I have this CMakeList:</span></span></p>
<p style="margin-top:0;margin-bottom:0"><span><span></span></span></p>
<div><span style="font-family:Consolas,Courier,monospace">cmake_minimum_required(VERSION 3.5)</span><br>
<span style="font-family:Consolas,Courier,monospace"></span><br>
<span style="font-family:Consolas,Courier,monospace">project(kImageAnnotator VERSION 0.0.1 LANGUAGES CXX)</span></div>
<span style="font-family:Consolas,Courier,monospace"></span><br>
<span style="font-family:Consolas,Courier,monospace"></span>
<p></p>
<span style="font-family:Consolas,Courier,monospace"></span>
<p style="margin-top:0;margin-bottom:0"><span><span><span style="font-family:Consolas,Courier,monospace">...</span><br>
<span style="font-family:Consolas,Courier,monospace"></span></span></span></p>
<span style="font-family:Consolas,Courier,monospace"></span>
<p style="margin-top:0;margin-bottom:0"><span><span style="font-family:Consolas,Courier,monospace"><br>
</span></span></p>
<span style="font-family:Consolas,Courier,monospace"></span>
<p style="margin-top:0;margin-bottom:0"><span><span></span></span></p>
<span style="font-family:Consolas,Courier,monospace"></span>
<div><span style="font-family:Consolas,Courier,monospace">add_library(${PROJECT_NAME} SHARED ${kimageannotator_SRCS})</span><br>
<span style="font-family:Consolas,Courier,monospace">target_link_libraries(${PROJECT_NAME} Qt5::Widgets KF5::CoreAddons KF5::I18n KF5::WidgetsAddons)</span><br>
<span style="font-family:Consolas,Courier,monospace"></span><br>
<span style="font-family:Consolas,Courier,monospace">target_include_directories(${PROJECT_NAME} PUBLIC $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}> $<INSTALL_INTERFACE:include>)</span><br>
<span style="font-family:Consolas,Courier,monospace"></span><br>
<span style="font-family:Consolas,Courier,monospace">set_target_properties(${PROJECT_NAME} PROPERTIES VERSION ${PROJECT_VERSION} SOVERSION 1)</span><br>
<span style="font-family:Consolas,Courier,monospace"></span><br>
<span style="font-family:Consolas,Courier,monospace">set(kimageannotator_CONFIG ${PROJECT_NAME}Config)</span><br>
<span style="font-family:Consolas,Courier,monospace"></span><br>
<span style="font-family:Consolas,Courier,monospace">install(TARGETS ${PROJECT_NAME} EXPORT ${kimageannotator_CONFIG}</span><br>
<span style="font-family:Consolas,Courier,monospace"> ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}</span><br>
<span style="font-family:Consolas,Courier,monospace"> LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}</span><br>
<span style="font-family:Consolas,Courier,monospace"> RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})</span><br>
<span style="font-family:Consolas,Courier,monospace">install(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/${PROJECT_NAME})</span><br>
<span style="font-family:Consolas,Courier,monospace"></span><br>
<span style="font-family:Consolas,Courier,monospace">install(EXPORT ${kimageannotator_CONFIG} DESTINATION share/${kimageannotator_CONFIG}/cmake)</span><br>
<span style="font-family:Consolas,Courier,monospace"></span><br>
<span style="font-family:Consolas,Courier,monospace">export(TARGETS ${PROJECT_NAME} FILE ${kimageannotator_CONFIG}.cmake)</span></div>
<div><span><span><br>
</span></span></div>
<div><span><span><br>
</span></span></div>
<div><span><span>In another test project, I add the library like this:</span></span></div>
<div><span><span><span style="font-family:Consolas,Courier,monospace">...</span><br>
<span style="font-family:Consolas,Courier,monospace"></span></span></span></div>
<span style="font-family:Consolas,Courier,monospace"></span>
<div><span><span><span style="font-family:Consolas,Courier,monospace"></span>
<div><span style="font-family:Consolas,Courier,monospace">find_package(kImageAnnotator REQUIRED)</span><br>
<span style="font-family:Consolas,Courier,monospace"></span><br>
<span style="font-family:Consolas,Courier,monospace">add_executable(testApp main.cpp)</span><br>
<span style="font-family:Consolas,Courier,monospace">target_link_libraries(testApp Qt5::Widgets kImageAnnotator)</span></div>
<div><span><span></span></span><br>
</div>
</span></span></div>
<div><br>
</div>
<div>Now when I try to build my test project, I get this:</div>
<div><br>
</div>
<div>
<div><span style="font-family:Consolas,Courier,monospace">dporobic@linux ~/projects/testApp/build</span><br>
<span style="font-family:Consolas,Courier,monospace">$ cmake .. && make</span><br>
<span style="font-family:Consolas,Courier,monospace">-- Could not set up the appstream test. appstreamcli is missing.</span><br>
<span style="font-family:Consolas,Courier,monospace">-- Configuring done</span><br>
<span style="font-family:Consolas,Courier,monospace">-- Generating done</span><br>
<span style="font-family:Consolas,Courier,monospace">-- Build files have been written to: /home/dporobic/projects/testApp/build</span><br>
<span style="font-family:Consolas,Courier,monospace">[ 25%] Automatic moc for target testApp</span><br>
<span style="font-family:Consolas,Courier,monospace">[ 25%] Built target testApp_automoc</span><br>
<span style="font-family:Consolas,Courier,monospace">Scanning dependencies of target testApp</span><br>
<span style="font-family:Consolas,Courier,monospace">[ 50%] Building CXX object CMakeFiles/testApp.dir/main.cpp.o</span><br>
<span style="font-family:Consolas,Courier,monospace">[ 75%] Building CXX object CMakeFiles/testApp.dir/testApp_automoc.cpp.o</span><br>
<span style="font-family:Consolas,Courier,monospace">[100%] Linking CXX executable testApp</span><br>
<span style="font-family:Consolas,Courier,monospace">CMakeFiles/testApp.dir/main.cpp.o: In function `main':</span><br>
<span style="font-family:Consolas,Courier,monospace">main.cpp:(.text+0x8e): undefined reference to `KImageAnnotator::KImageAnnotator(QPixmap const&)'</span><br>
<span style="font-family:Consolas,Courier,monospace">collect2: error: ld returned 1 exit status</span><br>
<span style="font-family:Consolas,Courier,monospace">CMakeFiles/testApp.dir/build.make:120: recipe for target 'testApp' failed</span><br>
<span style="font-family:Consolas,Courier,monospace">make[2]: *** [testApp] Error 1</span><br>
<span style="font-family:Consolas,Courier,monospace">CMakeFiles/Makefile2:67: recipe for target 'CMakeFiles/testApp.dir/all' failed</span><br>
<span style="font-family:Consolas,Courier,monospace">make[1]: *** [CMakeFiles/testApp.dir/all] Error 2</span><br>
<span style="font-family:Consolas,Courier,monospace">Makefile:94: recipe for target 'all' failed</span><br>
<span style="font-family:Consolas,Courier,monospace">make: *** [all] Error 2</span><br>
<br>
</div>
Any idea how I could/should troubleshoot such issue? <br>
</div>
</div>
</div>
</blockquote>
<div><br>
</div>
<div>Try to compile in verbose mode </div>
<div><br>
</div>
<div>make VERBOSE=1</div>
<div><br>
</div>
<div>and have a look at the culprit link line.</div>
<div>You should see the reference to your previously built shared lib.</div>
<div><br>
</div>
<div>Check whether this lib is where it should be (may be you didn't install it?)</div>
<div><br>
</div>
<div>then check which kImageAnnotatorConfig.cmake file is used by the testApp project in order to see if any</div>
<div>[wrong and not up to date] test & trial version of this file is lying around.</div>
<div> </div>
<div><br>
</div>
</div>
-- <br>
<div dir="ltr" class="m_1211585348752899202x_gmail_signature">
<div dir="ltr">
<div>
<div dir="ltr">
<div>Eric<br>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div>Eric<br></div></div></div></div></div></div><br clear="all"><div><br></div>-- <br><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div>Eric<br></div></div></div></div></div></div>