Re: Build a lib, then example programs

2007-08-10 Thread myrdos2
Thanks everyone! I've now got it working. However, I had to make a few changes: AM_CXXFLAGS = -D_REENTRANT -Wall AM_LDFLAGS = -lz LDADD = libdconn.a noinst_PROGRAMS = udpclient udpclient_LDADD = libdconn.a udpclient_SOURCES = examples/udpclient.cpp Somehow, if I put -lz in LDADD, it doesn't get

Re: Build a lib, then example programs

2007-08-09 Thread Ralf Wildenhues
Hello Benoit, all, * Benoit SIGOURE wrote on Thu, Aug 09, 2007 at 10:12:02AM CEST: > > Hmm, that's not related to your problem but I *think* that you should do > something like this: > > nobase_include_HEADERS = DyConnect.h \ > libdconn/DasyneInterface.hpp \ > ... > libdconn/syn

Re: Build a lib, then example programs

2007-08-09 Thread Benoit SIGOURE
On Aug 9, 2007, at 12:58 AM, myrdos2 wrote: I've been trying to use the autotools to compile a static library. The lib itself compiles and installs OK, but I'm having trouble with the example programs. These programs must be linked with the lib to compile. I keep getting 'undefined refere

Re: Build a lib, then example programs

2007-08-09 Thread Ralf Wildenhues
Hello, * myrdos2 wrote on Thu, Aug 09, 2007 at 12:58:38AM CEST: > > lib_LIBRARIES = libdconn.a [...] > noinst_PROGRAMS = udpclient > udpclient_SOURCES = examples/udpclient.cpp > > My example program is udpclient. How would I link udpclient to libdconn.a, > and how would I make sure that udpclien

Re: Build a lib, then example programs

2007-08-09 Thread Alexandre Duret-Lutz
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 woul

Build a lib, then example programs

2007-08-08 Thread myrdos2
I've been trying to use the autotools to compile a static library. The lib itself compiles and installs OK, but I'm having trouble with the example programs. These programs must be linked with the lib to compile. I keep getting 'undefined reference' errors when I try to compile them, even if the l