help linking my own library

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

 



   Hy!

   I have a problem with a library I wrote. The
library sems to compile just fine, and also linking.
But I get an error when linking it in another program.
   This is how I compiled the library:

LDFLAGS = -O1 -s -shared -lz -ljpeg -lpng -lungif
-ltiff

all: liballa

clean: 
	rm *.o

liballa: $(OBJ)
	g++ -L /usr/local/lib $(LDFLAGS) -o liballa.so $(OBJ)

#< following the compilation of all cpp files>
.....


The problem is that when usimg this libray in another
program (test program) I get a undefined reference
error:

../bsd/liballa.so: undefined reference to
`pdfx::PNGImage::PNGImage(....

This is how I compiled my test program:

all: test_bsd

clean:
	rm *.o	
	rm test_bsd

test_bsd: test.o
	g++ -L ../bsd -O1 -lalla test.o -o test_bsd

test.o: test.cpp
	g++ -c test.cpp


Could somebody please tell me what I did wrong ?

Thanks.




	

	
		
___________________________________________________________
Gesendet von Yahoo! Mail - Jetzt mit 100MB Speicher kostenlos - Hier anmelden: http://mail.yahoo.de

[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux