2001.03.01 16:42 "Error while trying to compile a program using TIFF library", by Chakravarthy Terlapu

2001.03.01 17:09 "Re: Error while trying to compile a program using TIFF library", by Henk Jan Priester

I am trying to compile a program using TIFF library and I get the following errors. erase.c is the file which uses the TIFF library, I am trying to compile using -ltiff.

When I tried a sample program using cc test.c -ltiff it compiled fine, it also did compile with g++ test.c -ltiff although it gave me a warning

ld32: WARNING 127: Two shared objects with the same soname, /usr/lib32/mips3/libm.so and /usr/lib32/libm.so, have been been linked. This is probably due to a missing -L specification. Ignoring the latter.

But when i try using it in a make file it gives errors as shown.

>make
        g++ -g -c box.c -o box.o
        g++ -g -c minRectangle.cpp -o minRectangle.o
        g++ -g -c extend.cpp -o extend.o
        g++ erase.c -ltiff -o erase.o
ld32: WARNING 127: Two shared objects with the same soname,
/usr/lib32/mips3/libm.so and /usr/lib32/libm.so, have been been linked.
This is probably due to a missing -L specification. Ignoring the latter.

I suppose you need to compile erase.c first, and then link the four objects. You are now missing main.

Eg something like this:
        g++ -g -c erase.c
        g++ -o prog box.o minRectangle.o extend.o erase.o -ltiff

Henk Jan

H.J. Priester                           email  H.J.Priester@justcroft.nl
Justcroft Technical Systems B.V.        Tel:   +31 70 3644131
Atjehstraat  21, 2585 VG           Tel:   +31 70 3459520 (Helpdesk)
The Netherlands                         Fax:   +31 70 3107593
-------------------------------------------------------------------------------