m> I keep getting 'undefined reference' errors when I try to
 m> compile them, even if the library has already been built.

You're likely linking with the installed version, not the one
you just built.

 m> My example program is udpclient. How would I link udpclient to libdconn.a,
 m> and how would I make sure that udpclient isn't built before libdconn.a?

use -l... only for system libraries
spell out the actual filename for you own libraries
use LDADD (not LDFLAGS) to specify libraries a program should link against

AM_CXXFLAGS = -D_REENTRANT -Wall
AM_LDFLAGS = -pthread 
LDADD = libdconn.a -lz

lib_LIBRARIES = libdconn.a
libdconn_a_SOURCES = ...

noinst_PROGRAMS = udpclient
udpclient_SOURCES = ...

-- 
Alexandre Duret-Lutz

Shared books are happy books.     http://www.bookcrossing.com/friend/gadl


Reply via email to