On 13.03.2013 13:35, Mirko D. Comparetti wrote:

> So, I'm using 1.3.2 (right now re-downloaded and compiled), but the problem 
> is still present.
>
> Here is the example of linking command:
> - - - - 8< - - - - 8< - - - - 8< - - - - 8< - - - -
> g++ CMakeFiles/test.dir/main.cpp.o -o test -rdynamic -lfltk_images 
> -lfltk_forms -lfltk_gl -lGL -lfltk -lSM -lICE -lX11 -lXext -lm -lGLU -lGL 
> -lSM -lICE -lX11 -lXext -lm -lGLU -lfltk
> - - - - 8< - - - - 8< - - - - 8< - - - - 8< - - - -
>
> If I explicitly tell cmake to use static libraries with 
> «set(CMAKE_EXE_LINKER_FLAGS "-static")»
> I got several errors like: «warning: Using 'getaddrinfo' in statically 
> linked applications requires at runtime the shared libraries from the glibc 
> version used for linking» and an error «/usr/bin/ld: cannot find -lGL»
>
> My set-up is: Ubuntu 12.04 with "gcc version 4.6.3 (Ubuntu/Linaro 
> 4.6.3-1ubuntu5)". Do you need anything else?
>
> Thank you,
>
> Regards
>
> MDC
>
> P.s. I have the same problem also with the Fl_Text_Buffer

Okay, then it's maybe a more general problem, but I'm in a hurry
right now, so I can only give a short answer:

To know how to link statically, please take a look at the output
of "fltk-config --ldflags".

If you can't find out how to do the same in CMake (sorry again,
me and the other FLTK dev's don't know CMake enough to help you),
then you can try to disable the SHARED option in the FLTK build,
so that you can only link statically. Otherwise, you can try to
remove (rename) the shared libraries from the search path...

Another POSSIBLE PROBLEM might be if you got the Ubuntu libraries
installed, but want to link with your local FLTK build. Again,
this may be a CMake (howto) problem, but the best you can do is
probably to remove the installed FLTK libs, because your problems
can also result from library version mix (compile with the current
1.3.2 lib, and link with the system 1.??.?? lib).

If nothing of this helps, I can try to do it with CMake myself,
but I'm not sure if I can do it successfully, and it WILL take
some time (days) until I can find the time to do it. :-(

Albrecht

_______________________________________________
fltk mailing list
fltk@easysw.com
http://lists.easysw.com/mailman/listinfo/fltk

Reply via email to