mark
mark

Reputation: 31

linker error in c

how can i resolve a linker error in c?

this is the error message:

undefined reference to HPDF_Page_SetRGBStroke

Upvotes: 0

Views: 1443

Answers (2)

Martin B
Martin B

Reputation: 24170

Apparently, you're trying to use a routine from the libharu PDF library, and it seems you're not linking against this library.

How exactly you would resolve this depends on the toolchain you're using -- under gcc, you would have to add a -lharu option or similar to the linker options.

Upvotes: 1

Joey
Joey

Reputation: 354774

If you are using an external library, you have to tell the linker that it should be included. It has no means of automagically finding out what you're using there.

Using gcc you can do this by compiling the program with -llibrary.

Upvotes: 1

Related Questions