Re: How to static link a program?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> I tried on one of my projects, and the only static libraries are those
> compiled inside the project.
> It seems that those flags are intended for libraries production. To have
> static linking of the libraries in the executable, you must probably
> list the libraires in the LDFLAGS, i.e. /usr/lib/libglib.a instead of
> -lglib, which will need some editing in Makefile.am.

Correct, the configure flags are to determine if you want to make static
and/or dynamic/shared libraries.

If you add -shared or -dynamic, you make gcc/ld have a preferred choice if
it finds both shared and dynamic libraries. -shared is the default.


Stian
_______________________________________________

gtk-list@xxxxxxxxx
http://mail.gnome.org/mailman/listinfo/gtk-list

[Index of Archives]     [Touch Screen Library]     [GIMP Users]     [Gnome]     [KDE]     [Yosemite News]     [Steve's Art]

  Powered by Linux