[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: autoconf linking with shared object
From: |
Matt Kowalczyk |
Subject: |
Re: autoconf linking with shared object |
Date: |
Tue, 28 Mar 2006 14:33:54 -0800 |
Thanks... I have another question.
I am using the gtk library and to compile it properly with automake I have
to do this:
AM_LDFLAGS = -lcrypto -lglib-2.0 -lgtk-x11-2.0 -lgdk-x11-2.0
-latk-1.0-lgdk_pixbuf-
2.0 -lm -lpangoxft-1.0 -lpangox-1.0 -lpangoft2-1.0 -lpango-1.0 -lgobject-2.0-
lgmodule-2.0 -ldl -lglib-2.0
AM_CPPFLAGS = $(DEPS_CFLAGS)
I want to be able to include this host of packages
-lglib-2.0 -lgtk-x11-2.0 -lgdk-x11-2.0 -latk-1.0 -lgdk_pixbuf-2.0 -lm -
lpangoxft-1.0 -lpangox-1.0 -lpangoft2-1.0 -lpango-1.0 -lgobject-2.0 -
lgmodule-2.0 -ldl -lglib-2.0
which I got from by running pkg-config using the similiar approach with the
AM_CPPFLAGS = $(DEPS_CFLAGS)
I initialize DEPS in my configure.ac file, and I am not entirely sure what
it does. Maybe you can shine some insight here also. Anyway, I have:
PKG_CHECK_MODULES(DEPS, gtk+-2.0 >= 2.2 glib-2.0 >= 2.2)
I assume I can de DEPS_CFLAGS because of the above line in my
configuration.ac file.
Am I doing this correctly?
Thanks,
Matt
On 3/28/06, Brian Dessent <address@hidden> wrote:
>
> Matt Kowalczyk wrote:
>
> > This forces me to add /usr/lib/libcrypto.so to the gcc command when I
> link the
> > object to produce an executable for instance. My gcc command looks
> something
> > like below:
> >
> > gcc --pedantic -Wall -std=c99 -O2 -g -O2 /usr/lib/libcrypto.so -o
> main Main.o
> > my_md5.o
>
> You really should not specify the full filename/path of the library like
> that. In addition to the reasons already given by others, not every
> system uses ".so" as the extension of shared libraries. Some call it
> .dylib, some .dll, and so on. Some people might want to statically
> link. Some people might want to link against a copy of the library
> installed elsewhere. "-lcrypto" handles all of these cases.
>
> Brian
>
>
> _______________________________________________
> Autoconf mailing list
> address@hidden
> http://lists.gnu.org/mailman/listinfo/autoconf
>
- autoconf linking with shared object, Matt Kowalczyk, 2006/03/27
- Re: autoconf linking with shared object, Ralf Wildenhues, 2006/03/28
- Re: autoconf linking with shared object, Brian Dessent, 2006/03/28
- Re: autoconf linking with shared object,
Matt Kowalczyk <=
- Re: autoconf linking with shared object, Ralf Wildenhues, 2006/03/29
- Re: autoconf linking with shared object, Braden McDaniel, 2006/03/29
- Re: autoconf linking with shared object, Ralf Wildenhues, 2006/03/29
- Re: autoconf linking with shared object, Andreas Schwab, 2006/03/29
- Re: autoconf linking with shared object, Braden McDaniel, 2006/03/29
- Re: autoconf linking with shared object, Ralf Wildenhues, 2006/03/29