pythonic
pythonic

Reputation: 21625

How to link with libtiff

How do I specify in my makefile that I want to link with the libtiff library. Just specifying -ltiff in LDFLAGS is not working.

Upvotes: 2

Views: 3506

Answers (2)

Ed Heal
Ed Heal

Reputation: 60007

Either you can use the -L flag (see either manual for the compiler - I am assuming that you are using gcc or g++

or

Set the environment variable LD_LIBRARY_PATH to include the path for the library

But you should also consider static or dynamic linking. The documentation for both compilers are very good to explain how to do either.

Upvotes: 1

CCoder
CCoder

Reputation: 2335

Try giving the following options for compilation.

g++ -L[path of libtiff on your machine] -ltiff [your remaining options] ...

-L option is used to tell gcc, where to find the librarires you are trying to link with.

Upvotes: 1

Related Questions