Hello, can someone figure out what I&#39;m doing wrong.<br>Here is the output I get when I attempt to compile: -<br>=================================<br>yogesh@linux-sm3q:~/gravity/New&gt; make<br>Scanning dependencies of target GravityCore<br>
[ 91%] Built target GravityCore<br>Scanning dependencies of target Gravity<br>Linking CXX executable Gravity<br>CMakeFiles/Gravity.dir/main.o: In function `main&#39;:<br>/home/yogesh/gravity/app/main.cpp:10: undefined reference to `GApplication::GApplication()&#39;<br>
/home/yogesh/gravity/app/main.cpp:12: undefined reference to `Gravity::self()&#39;<br>/home/yogesh/gravity/app/main.cpp:12: undefined reference to `Gravity::gUIInterfaceManager() const&#39;<br>/home/yogesh/gravity/app/main.cpp:13: undefined reference to `GApplication::~GApplication()&#39;<br>
collect2: ld returned 1 exit status<br>make[2]: *** [app/Gravity] Error 1<br>make[1]: *** [app/CMakeFiles/Gravity.dir/all] Error 2<br>make: *** [all] Error 2<br>=================================<br><br>Thanks,<br><br>-- <br>
Yogesh M
<br><div class="gmail_quote"><br><br>2008/7/10 Yogesh Marwaha &lt;<a href="mailto:yogeshm.007@gmail.com">yogeshm.007@gmail.com</a>&gt;:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
My project used to compile &amp; link fine with cmake 2.4 on openSUSE 10.3.<br>Recently I upgraded to openSUSE 11, hence cmake 2.6, and now error is being shown at link time.<br><br>The project is mainly split in 3 sub-folders: -<br>

1. library; generates GravityCore shared library<br>2. app; generates an executable which uses (links to) the GravityCore shared library.<br>3. modules; collection of shared libraries (read plugins) which links to GravityCore (and loaded by app)<br>

<br>Error is shown at the time of linking of app/modules. The linker complains of unresolved symbols (which are in library).<br><br>Nothing has changed in the project since the upgrade and one thing to note is that GravityCore library file which earlier used to be about 10 MB is now around 6 MB. And when it built GravityCore as static library, just to see the results, the project compiled and linked fine.<br>

<br>Please help me to resolve the issue.<br><br>Here are cmakelists.txt files from my project for your perusal: -<br><br>CMAKELISTS.TXT IN BASE FOLDER<br>=============================<br>project (Gravity)<br>cmake_minimum_required (VERSION 2.4.0)<br>

set (CMAKE_MODULE_PATH &quot;${CMAKE_SOURCE_DIR}/cmake_modules/&quot; &quot;/usr/share/kde4/apps/cmake/modules&quot;)<br>find_package (Taglib REQUIRED)<br>find_package (Qt4 REQUIRED)<br>find_package (KDE4 REQUIRED)<br>add_subdirectory (library)<br>

add_subdirectory (app)<br>add_subdirectory (modules)<br>----------------------------<br><br>CMAKELISTS.TXT IN library FOLDER<br>================================<br>set (QT_USE_QTXML TRUE)<br>include (${QT_USE_FILE})<br>include_directories (${TAGLIB_INCLUDE_DIR} ${CMAKE_CURRENT_BINARY_DIR} ${KDE4_INCLUDES})<br>

set (GravityCore_SRCS<br>&nbsp; gcollection.cpp<br>&nbsp; gcollectionholder.cpp<br>&nbsp; ...<br>&nbsp; ...<br>&nbsp; sqliteengine.cpp<br>)<br>set (GravityCore_MOCS<br>&nbsp; gcollection.cpp<br>&nbsp; gcollectionholder.cpp<br>&nbsp; ...<br>&nbsp; ...<br>&nbsp; playlistcontainer.cpp<br>

)<br>qt4_automoc(${GravityCore_MOCS})<br><br>add_library (GravityCore SHARED ${GravityCore_SRCS})<br><br>target_link_libraries (GravityCore ${QT_LIBRARIES} ${QT_QTXML_LIBRARIES} ${TAGLIB_LIBRARIES} ${KDE4_PHONON_LIBS} ${KDE4_SOLID_LIBS} ${KDE4_KDECORE_LIBS} ${KDE4_KDEUI_LIBS} ${KDE4_KIO_LIBS} sqlite3)<br>

<br>install(TARGETS GravityCore DESTINATION lib)<br>install(FILES gravity_userinterface_plugin.desktop DESTINATION share/kde4/servicetypes)<br>--------------------------------<br><br><br>CMAKELISTS.TXT IN app FOLDER<br>============================<br>

include (${QT_USE_FILE})<br>include_directories (${KDE4_INCLUDES} ${Gravity_SOURCE_DIR}/library)<br>set (GravityApp_SRCS<br>&nbsp; main.cpp<br>)<br>link_directories (${Gravity_BINARY_DIR}/library)<br>add_executable (Gravity ${GravityApp_SRCS})<br>

target_link_libraries (Gravity GravityCore)<br>install(TARGETS Gravity DESTINATION bin)<br>install(FILES Gravity.desktop DESTINATION share/applications/kde4)<br>----------------------------<br><br><br>CMAKELISTS.TXT IN modules FOLDER<br>

================================<br>include (${QT_USE_FILE})<br>include_directories (${CMAKE_CURRENT_BINARY_DIR} ${KDE4_INCLUDES} ${Gravity_SOURCE_DIR}/library)<br>set (GravityBasicUIPlugin_SRCS<br>&nbsp; gravitymainwindow.cpp<br>

&nbsp; playerwidget.cpp<br>&nbsp; gscrollwidget.cpp<br>)<br>set (GravityBasicUIPlugin_MOCS<br>&nbsp; gravitymainwindow.cpp<br>&nbsp; playerwidget.cpp<br>&nbsp; gscrollwidget.cpp<br>)<br>qt4_automoc(${GravityBasicUIPlugin_MOCS})<br>link_directories (${Gravity_BINARY_DIR}/library)<br>

add_library (GravityBasicUIPlugin MODULE ${GravityBasicUIPlugin_SRCS})<br><br>target_link_libraries (GravityBasicUIPlugin GravityCore)<br><br>install(TARGETS GravityBasicUIPlugin DESTINATION lib/kde4)<br>install(FILES gravity_basic_userinterface.desktop DESTINATION share/kde4/services)<br>

--------------------------------<br><br>Thanks for any help offered,<br><font color="#888888"><br>Yogesh<br>
</font></blockquote></div><br>