I am creating a Qt widget with a backend representation I wrote separately. The backend uses Magick++, and I can get it to compile from the command line:
g++ -c ../SpriteCreator/WriteGIF.cpp sprite.cpp -I ../SpriteCreator/
Magick++-config --cxxflags --cppflagsMagick++-config --ldflags --libs-O2
but when I try to compile the project Qt Creator it tells me
/home/tpope/obeyYourThirst/qtSpriteEditor/backend/sprite.cpp:15: error: Magick++.h: No such file or directory #include < Magick++.h>
I added the path for Magick++.h to the INCLUDEPATH, but now it has an error similar to this:
/home/tpope/obeyYourThirst/qtSpriteEditor/backend/sprite.cpp:66: error: undefined reference to `Magick::InitializeMagick(char const*)'
for every use of a Magick function. It seems to be not including the library. How do I do that in Qt Creator?
Magick++-configstuff inside$()like this...$(Magick++-config --cxxflags --cppflags --ldflags --libs)to actually execute them,Magick++-config... -- ... --ldflags --libscommand I gave above in your Terminal, and copy and paste the output into your Qt Creator Makefile and see if that fixes it for now.