How to link pnglite library in c?

Posted by zaplec on Stack Overflow See other posts from Stack Overflow or by zaplec
Published on 2010-03-30T07:30:57Z Indexed on 2010/03/30 7:33 UTC
Read the original article Hit count: 304

Filed under:
|
|
|

Hi,

I installed from kubuntu's package management this handy pnglite library. It contains just one header file "pnglite.h" and one object file "pnglite.o". I have found out where those files are, but I don't know how to link them. I'm using netbeans, but don't know how to link them in there. Also I don't understand how to link them at console.

I have a little test program that I would like to test, but I get the error message "undefined reference to function: XXXXXXX". Both netbeans and at console I'm using gcc. That header file is in /usr/include directory, object file is in /usr/lib directory and my test program is under my programming directory at my home directory.

Should I put that header and object into the same directory as where my source is? Or is there a way to link them from their current locations? I know that it should be possible to link them from where they are at the moment and I would like to know and understand how to do that.

Any help will be appreciated :)

© Stack Overflow or respective owner

Related posts about c

    Related posts about kubuntu