> On 13.03.2013 10:50, Albrecht Schlosser wrote: > [...] > Please read the file README.CMake.txt, particularly the part about > using FLTK with CMake. If you know how to work with CMake, you should > understand what you need, but I can't say what it is. I can only guess > that $(FLTK_LINKLIBRARIES) is not correct, since in the example given > in this file you can read: > > target_link_libraries(hello fltk) > > and later, why the name "fltk" is chosen and more... > > If this doesn't help, please try to post the linker command and > information about your OS (and version), FLTK version, and build > system (e.g. MinGW on Windows?). > > Albrecht > I read the instruction on that file and I tried to adapt to my situation, so now the cmakefile is:
- - - - 8< - - - - 8< - - - - 8< - - - - 8< - - - - 8< - - - - cmake_minimum_required(VERSION 2.8) project(test) find_package(FLTK REQUIRED NO_MODULE) include(${FLTK_USE_FILE}) set(test_SRCS main.cpp ) set(test_HDRS ) add_executable(test ${APPLICATION_EXECUTABLE_SYSTEM} ${test_SRCS} ${test_HDRS}) target_link_libraries(test fltk) - - - - 8< - - - - 8< - - - - 8< - - - - 8< - - - - 8< - - - - which doesen't work at all because of the following cmake error: - - - - 8< - - - - 8< - - - - 8< - - - - 8< - - - - 8< - - - - CMake Error at CMakeLists.txt:6 (include): include called with wrong number of arguments. Include only takes one file. - - - - 8< - - - - 8< - - - - 8< - - - - 8< - - - - 8< - - - - If I remove that include(${FLTK_USE_FILE}) I still get the - - - - 8< - - - - 8< - - - - 8< - - - - 8< - - - - 8< - - - - Linking CXX executable test CMakeFiles/test.dir/main.cpp.o: In function `main': main.cpp:(.text+0x5f): undefined reference to `Fl_Output::Fl_Output(int, int, int, int, char const*)' collect2: ld returned 1 exit status make[2]: *** [test] Errore 1 make[1]: *** [CMakeFiles/test.dir/all] Errore 2 make: *** [all] Errore 2 - - - - 8< - - - - 8< - - - - 8< - - - - 8< - - - - 8< - - - - When I issue 'make VERBOSE=1', this is what it does: /usr/bin/c++ CMakeFiles/test.dir/main.cpp.o -o test -rdynamic -lfltk My current set-up is: Ubuntu 12.04 with FLTK 1.3.2, using eclipse and make. Thank you again, MDC _______________________________________________ fltk mailing list fltk@easysw.com http://lists.easysw.com/mailman/listinfo/fltk