Question

I have qtcreator 5 and I want to use the libpng12-0 library. I don't know how I have to link into my project ? There's a problem when I writte:

loadedimage = IMG_Load(filename.c_str());

I know that I have to writte something like:

     LIBS += -L
     LIBS += -libpng12-0

Does anyone know what I have to do ?

I tried a lot of things but I'm new on qt creator 5. Thanks for help. Sorry for my english.

Was it helpful?

Solution

If you need a GUI method then,

  • Open .pro file
  • Right click any where in text editor area
  • Choose Add Library
  • Then choose the type of library
  • Provide the path of the library file
  • Done.

If you directly want to edit .pro file, then library name will be -lpng12-0 not -libpng12-0 .

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top