As far as I know, yes and no. I mean that you can statically link IUP, but
you will still have the dependency on GTK (to more experienced people on
the list, obviously please correct me if I'm wrong).
I managed to statically link IUP by passing to GCC the path to libiup.a and
adding the shared GTK libraries with the usual -l options:  -lgtk-x11-2.0
-lgdk-x11-2.0 -lgdk_pixbuf-2.0 -lpango-1.0 -lgobject-2.0 -lgmodule-2.0
-lglib-2.0 -lXext -lX11 -lm.
You probably get the errors on the missing functions because they are in
those shared libraries, and the linker doesn't know it.
I hope this won't be seen as spam, here is my boilerplate repository for
statically linked IUP applications:
https://github.com/gianluca-nitti/iup-cp-boilerplate. You can find the full
compiler command line in the makefile at the root of the repository.
It includes scripts to download IUP from sourceforge and to install
required packages if you are on Ubuntu. I haven't updated it since IUP
3.15, though.

2016-07-05 21:55 GMT+02:00 anon anon <[email protected]>:

> i understand i can statically link the iup library but is it possible to
> make a completely static iup executable in linux? i tried using the -static
> option on gcc and it gives me this warning on various function names:
> warning: Using 'getaddrinfo' in statically linked applications requires at
> runtime the shared libraries from the glibc version used for linking
>
> and it ends with this error:
> collect2: error: ld returned 1 exit status
>
>
> ------------------------------------------------------------------------------
> Attend Shape: An AT&T Tech Expo July 15-16. Meet us at AT&T Park in San
> Francisco, CA to explore cutting-edge tech and listen to tech luminaries
> present their vision of the future. This family event has something for
> everyone, including kids. Get more information and register today.
> http://sdm.link/attshape
> _______________________________________________
> Iup-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/iup-users
>
------------------------------------------------------------------------------
Attend Shape: An AT&T Tech Expo July 15-16. Meet us at AT&T Park in San
Francisco, CA to explore cutting-edge tech and listen to tech luminaries
present their vision of the future. This family event has something for
everyone, including kids. Get more information and register today.
http://sdm.link/attshape
_______________________________________________
Iup-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/iup-users

Reply via email to