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

Re: Bug #82418



On Wed, Jan 22, 2003 at 06:44:23AM -0500, Adam H. Pendleton wrote:
> 
> On Wednesday, January 22, 2003, at 06:11 AM, Jeff Johnson wrote:
> 
> > You're linking the set of libraries needed to use rpm. That means
> > that you will need to link
> > 	librpm
> > 	librpmdb
> > 	librpmio
> > 	libpopt
> > 	libbz2
> > 	libz
> > 	libpthread
> > 	librt
> > in approximately that order.
> 
> gcc -Wall -I/usr/include/rpm -g -O2   -o program /usr/lib/librpm.a 
> /usr/lib/librpmdb.a /usr/lib/librpmio.a /usr/lib/libpopt.a 
> /usr/lib/libbz2.a /usr/lib/libz.a /usr/lib/libpthread.a 
> /usr/lib/librt.a /usr/lib/libwrap.a program.o /usr/lib/libwrap.a
> program.o: In function `cleanup':
> /dir/dir/src/program/src/program.c:72: undefined reference to 
> `rpmtsFree'
> program.o: In function `process_requests':
> /dir/dir/src/program/src/program.c:90: undefined reference to 
> `rpmtsCreate'
> /dir/dir/src/program/src/program.c:120: undefined reference to 
> `rpmtsSetRootDir'
> /dir/dir/src/program/src/program.c:246: undefined reference to 
> `rpmReadPackageFile'
> /dir/dir/src/program/src/program.c:247: undefined reference to 
> `rpmtsAddInstallElement'
> /dir/dir/src/program/src/program.c:260: undefined reference to 
> `rpmtsRun'
> /dir/dir/src/program/src/program.c:277: undefined reference to 
> `rpmtsEmpty'
> /dir/dir/src/program/src/program.c:262: undefined reference to 
> `rpmlogMessage'
> collect2: ld returned 1 exit status
> make: *** [program] Error 1
> 

Put program.o first.

73 de Jeff

-- 
Jeff Johnson	ARS N3NPQ
jbj@redhat.com (jbj@jbj.org)
Chapel Hill, NC





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