I had set the path for FLTK_CONFIG manually in CMakeCache.txt, and that's why it didn't give any error during configuring the package(running cmake), but now after removing the path it can't find fltk-config anymore:

-- Stage version 3.1.0
-- Checking for libtool
--   found
-- Checking for required libraries...
--   * Glib version 2.14.1 detected at /usr
--     GLIB_CFLAGS = -I/usr/include/glib-2.0;-I/usr/lib/glib-2.0/include
--     GLIB_LDFLAGS = -lglib-2.0
--   * Libpng version 1.2.18 detected at /usr
--     LIBPNG_CFLAGS = -I/usr/include/libpng12
--     LIBPNG_LDFLAGS = -lpng12
CMake Error: Cannot find fltk-config, aborting
-- Configuring done

I've installed "fltk-1.1.9" in a non-standard path and currently set the following environment variables:

LIBRARY_PATH=/cs/public/generic/lib/pkg/PlayerStageGazebo/Dependencies/FLTK/lib/:
CMAKE_LIBRARY_PATH=/cs/public/generic/lib/pkg/PlayerStageGazebo/Dependencies/FLTK/lib/:/usr/lib/
FLTK_CONFIG_PATH=/cs/public/generic/lib/pkg/PlayerStageGazebo/Dependencies/FLTK/bin/
CPATH=/cs/public/generic/lib/pkg/PlayerStageGazebo/Dependencies/FLTK/include/:
FLTK_CONFIG=/cs/public/generic/lib/pkg/PlayerStageGazebo/Dependencies/FLTK/bin/
PATH=/cs/public/generic/lib/pkg/PlayerStageGazebo/Dependencies/FLTK/bin:/usr/local/bin:/usr/bin:/usr/X11R6/bin:/bin:/var/lib/dosemu:/usr/games:/opt/bin:/opt/kde3/bin:/opt/kde2/bin:/opt/kde/bin:/usr/openwin/bin:/opt/cross/bin:/usr/bin/X11:/usr/lib/mit/bin:/usr/lib/mit/sbin:/usr/lib/qt3/bin
FLTK_CFLAGS=
CMAKE_INCLUDE_PATH=/cs/public/generic/lib/pkg/PlayerStageGazebo/Dependencies/FLTK/include/:/usr/include/


this command fltk-config --use-gl --use-images --cxxflags gives the following result:

-I/cs/public/generic/lib/pkg/PlayerStageGazebo/Dependencies/FLTK//include


Thanks for your attention

 --Pooyan
 



On Mon, Jan 19, 2009 at 4:47 AM, Pooyan Fazli <pooyanf@cs.ubc.ca> wrote:
Hi Everyone

I'm trying to get Stage 3.0.1 installed on a linux machine (OpenSuse 10.3, gcc 4.2.1), but I get the error below which seems to be an issue with linking a library with FLTK flags. I found the following patches related to this problem and got to install them:

http://sourceforge.net/tracker/index.php?func=detail&aid=2154468&group_id=42445&atid=433166
and
http://sourceforge.net/tracker/index.php?func=detail&aid=2154511&group_id=42445&atid=433166

but I still get the error:


-- Stage version 3.0.1
-- Checking for OpenGL
-- OpenGL found
-- Checking for Player
--   Player headers found in Player//include/player-2.1
--   Player libs found in Player//lib
-- Looking for FLTK
-- Linking to FLTK statically.
FLTK version  detected via /FLTK/bin
    FLTK_CFLAGS =
    FLTK_LDFLAGS =
-- Checking for libtool
--   found
-- Building Player plugin
-- Configuring done
-- Generating done
-- Build files have been written to: /Stage-3.0.1-Source

As you see above, FLTK_CFLAGS and FLTK_LDFLAGS, none of them are assigned any value
 
[ 56%] Building CXX object libstage/CMakeFiles/stage.dir/
world.o
[ 59%] Building CXX object libstage/CMakeFiles/stage.dir/
worldfile.o
[ 61%] Building CXX object libstage/CMakeFiles/stage.dir/
worldgui.o
Linking CXX shared library libstage.so
[ 63%] Building CXX object libstage/CMakeFiles/
stagebinary.dir/main.o
Linking CXX executable stage
/Stage-3.0.1-Source/libstage/
libstage.so: undefined reference to `Fl_File_Chooser::value(int)'
/Stage-3.0.1-Source/libstage/
libstage.so: undefined reference to `fl_alert(char const*, ...)'
/Stage-3.0.1-Source/libstage/
libstage.so: undefined reference to `Fl_Shared_Image::get(char const*, int, int)'
/Stage-3.0.1-Source/libstage/
libstage.so: undefined reference to `Fl::repeat_timeout(double, void (*)(void*), void*)'
/Stage-3.0.1-Source/libstage/
libstage.so: undefined reference to `vtable for Fl_Box'
/Stage-3.0.1-Source/libstage/libstage.so: undefined reference to `Fl_Window::size_range_()'
/Stage-3.0.1-Source/libstage/libstage.so: undefined reference to `Fl_File_Chooser::shown()'
/Stage-3.0.1-Source/libstage/libstage.so: undefined reference to `Fl_Text_Buffer::text(char const*)'
/Stage-3.0.1-Source/libstage/libstage.so: undefined reference to `fl_old_shortcut(char const*)'
/Stage-3.0.1-Source/libstage/libstage.so: undefined reference to `Fl_Text_Display::Fl_Text_Display(int, int, int, int, char const*)'
/Stage-3.0.1-Source/libstage/libstage.so: undefined reference to `Fl::e_x'
/Stage-3.0.1-Source/libstage/libstage.so: undefined reference to `Fl_Gl_Window::show()'
/Stage-3.0.1-Source/libstage/libstage.so: undefined reference to `Fl_Gl_Window::hide()'
/Stage-3.0.1-Source/libstage/libstage.so: undefined reference to `Fl_Window::resize(int, int, int, int)'
/Stage-3.0.1-Source/libstage/libstage.so: undefined reference to `Fl::wait()'
/Stage-3.0.1-Source/libstage/libstage.so: undefined reference to `fl_choice(char const*, char const*, char const*, char const*, ...)'
/Stage-3.0.1-Source/libstage/libstage.so: undefined reference to `Fl_Widget::window() const'
/Stage-3.0.1-Source/libstage/libstage.so: undefined reference to `Fl_Gl_Window::init()'
/Stage-3.0.1-Source/libstage/libstage.so: undefined reference to `png_init_io'
/Stage-3.0.1-Source/libstage/libstage.so: undefined reference to `Fl_File_Chooser::ok_label(char const*)'
/Stage-3.0.1-Source/libstage/libstage.so: undefined reference to `Fl_PNG_Image::Fl_PNG_Image(char const*)'
/Stage-3.0.1-Source/libstage/libstage.so: undefined reference to `Fl_Text_Buffer::Fl_Text_Buffer(int)'
/Stage-3.0.1-Source/libstage/libstage.so: undefined reference to `Fl_Group::begin()'
/Stage-3.0.1-Source/libstage/libstage.so: undefined reference to `Fl_Gl_Window::draw_overlay()'
/Stage-3.0.1-Source/libstage/libstage.so: undefined reference to `Fl_Gl_Window::~Fl_Gl_Window()'
/Stage-3.0.1-Source/libstage/libstage.so: undefined reference to `Fl_Menu_::Fl_Menu_(int, int, int, int, char const*)'
/Stage-3.0.1-Source/libstage/libstage.so: undefined reference to `Fl_Text_Buffer::~Fl_Text_Buffer()'
/Stage-3.0.1-Source/libstage/libstage.so: undefined reference to `Fl::check()'
/Stage-3.0.1-Source/libstage/libstage.so: undefined reference to `Fl_Window::Fl_Window(int, int, char const*)'
/Stage-3.0.1-Source/libstage/libstage.so: undefined reference to `png_set_rows'
/Stage-3.0.1-Source/libstage/libstage.so: undefined reference to `vtable for Fl_Gl_Window'
/Stage-3.0.1-Source/libstage/libstage.so: undefined reference to `png_create_info_struct'
/Stage-3.0.1-Source/libstage/libstage.so: undefined reference to `gl_font(int, int)'
/Stage-3.0.1-Source/libstage/libstage.so: undefined reference to `Fl_File_Chooser::show()'
/Stage-3.0.1-Source/libstage/libstage.so: undefined reference to `Fl_Shared_Image::release()'
/Stage-3.0.1-Source/libstage/libstage.so: undefined reference to `Fl_Window::hide()'
/Stage-3.0.1-Source/libstage/libstage.so: undefined reference to `Fl_Widget::label(char const*)'
/Stage-3.0.1-Source/libstage/libstage.so: undefined reference to `Fl_Window::Fl_Window(int, int, int, int, char const*)'
/Stage-3.0.1-Source/libstage/libstage.so: undefined reference to `Fl_File_Chooser::~Fl_File_Chooser()'
/Stage-3.0.1-Source/libstage/libstage.so: undefined reference to `Fl_Check_Button::Fl_Check_Button(int, int, int, int, char const*)'
/Stage-3.0.1-Source/libstage/libstage.so: undefined reference to `Fl_Widget::default_callback(Fl_Widget*, void*)'
/Stage-3.0.1-Source/libstage/libstage.so: undefined reference to `Fl::e_keysym'
/Stage-3.0.1-Source/libstage/libstage.so: undefined reference to `Fl::delete_widget(Fl_Widget*)'
/Stage-3.0.1-Source/libstage/libstage.so: undefined reference to `Fl_Button::Fl_Button(int, int, int, int, char const*)'
/Stage-3.0.1-Source/libstage/libstage.so: undefined reference to `Fl_Window::flush()'
/Stage-3.0.1-Source/libstage/libstage.so: undefined reference to `Fl::e_dy'
/Stage-3.0.1-Source/libstage/libstage.so: undefined reference to `gl_draw(char const*)'
/Stage-3.0.1-Source/libstage/libstage.so: undefined reference to `typeinfo for Fl_Window'
/Stage-3.0.1-Source/libstage/libstage.so: undefined reference to `Fl_Scroll::clear()'
/Stage-3.0.1-Source/libstage/libstage.so: undefined reference to `vtable for Fl_Return_Button'
/Stage-3.0.1-Source/libstage/libstage.so: undefined reference to `Fl_Widget::Fl_Widget(int, int, int, int, char const*)'
/Stage-3.0.1-Source/libstage/libstage.so: undefined reference to `Fl_Button::Fl_Button(int, int, int, int, char const*)'
/Stage-3.0.1-Source/libstage/libstage.so: undefined reference to `Fl_Window::handle(int)'
/Stage-3.0.1-Source/libstage/libstage.so: undefined reference to `png_create_write_struct'
/Stage-3.0.1-Source/libstage/libstage.so: undefined reference to `Fl::add_timeout(double, void (*)(void*), void*)'
/Stage-3.0.1-Source/libstage/libstage.so: undefined reference to `Fl_Window::draw()'
/Stage-3.0.1-Source/libstage/libstage.so: undefined reference to `Fl::e_y'
/Stage-3.0.1-Source/libstage/libstage.so: undefined reference to `Fl_Text_Buffer::insert(int, char const*)'
/Stage-3.0.1-Source/libstage/libstage.so: undefined reference to `Fl_Menu_::add(char const*, int, void (*)(Fl_Widget*, void*), void*, int)'
/Stage-3.0.1-Source/libstage/libstage.so: undefined reference to `Fl_Window::label(char const*)'
/Stage-3.0.1-Source/libstage/libstage.so: undefined reference to `png_set_IHDR'
/Stage-3.0.1-Source/libstage/libstage.so: undefined reference to `Fl_Widget::redraw()'
/Stage-3.0.1-Source/libstage/libstage.so: undefined reference to `png_write_png'
/Stage-3.0.1-Source/libstage/libstage.so: undefined reference to `Fl_Group::find(Fl_Widget const*) const'
/Stage-3.0.1-Source/libstage/libstage.so: undefined reference to `Fl_Gl_Window::resize(int, int, int, int)'
/Stage-3.0.1-Source/libstage/libstage.so: undefined reference to `Fl_Scroll::Fl_Scroll(int, int, int, int, char const*)'
/Stage-3.0.1-Source/libstage/libstage.so: undefined reference to `Fl::e_state'
/Stage-3.0.1-Source/libstage/libstage.so: undefined reference to `Fl_Window::Fl_Window(int, int, char const*)'
/Stage-3.0.1-Source/libstage/libstage.so: undefined reference to `vtable for Fl_Menu_Bar'
/Stage-3.0.1-Source/libstage/libstage.so: undefined reference to `gl_height()'
/Stage-3.0.1-Source/libstage/libstage.so: undefined reference to `Fl_Gl_Window::make_current()'
/Stage-3.0.1-Source/libstage/libstage.so: undefined reference to `Fl::e_number'
/Stage-3.0.1-Source/libstage/libstage.so: undefined reference to `Fl_Group::end()'
/Stage-3.0.1-Source/libstage/libstage.so: undefined reference to `fl_register_images()'
/Stage-3.0.1-Source/libstage/libstage.so: undefined reference to `Fl_File_Chooser::Fl_File_Chooser(char const*, char const*, int, char const*)'
/Stage-3.0.1-Source/libstage/libstage.so: undefined reference to `typeinfo for Fl_Gl_Window'
/Stage-3.0.1-Source/libstage/libstage.so: undefined reference to `Fl_Gl_Window::invalidate()'
/Stage-3.0.1-Source/libstage/libstage.so: undefined reference to `Fl_Button::value(int)'
/Stage-3.0.1-Source/libstage/libstage.so: undefined reference to `gl_width(char const*)'
/Stage-3.0.1-Source/libstage/libstage.so: undefined reference to `Fl_Gl_Window::flush()'
/Stage-3.0.1-Source/libstage/libstage.so: undefined reference to `Fl_Text_Display::buffer(Fl_Text_Buffer*)'
/Stage-3.0.1-Source/libstage/libstage.so: undefined reference to `Fl_Window::~Fl_Window()'
/Stage-3.0.1-Source/libstage/libstage.so: undefined reference to `png_destroy_write_struct'
/Stage-3.0.1-Source/libstage/libstage.so: undefined reference to `Fl_Window::show()'
collect2: ld returned 1 exit status
make[2]: *** [libstage/stage] Error 1
make[1]: *** [libstage/CMakeFiles/stagebinary.dir/all] Error 2
make: *** [all] Error 2


Thanks for your attention.

  --Pooyan