PDA

View Full Version : Help with ImageMagick



waffles
04-03-2013, 05:01 PM
Im going to use Magick++ to load textures into my application but Magick++.h cant seem to find <Magick++/Include.h>.

Im useing Code::Blocks and im on Ubuntu.

#ifndef TEXTURE_H
#define TEXTURE_H

#include <string>
#include <GL/glew.h>
#include <ImageMagick/Magick++.h>

class Texture
{
public:
Texture(GLenum TextureTarget, const std::string& FileName);

bool Load();

void Bind(GLenum TextureUnit);

private:
std::string m_fileName;
GLenum m_textureTarget;
GLuint m_textureObj;
Magick::Image* m_pImage;
Magick::Blob m_blob;
};


#endif /* TEXTURE_H */


/usr/include/ImageMagick/Magick++.h|9|fatal error: Magick++/Include.h: No such file or directory|
||=== Build finished: 1 errors, 0 warnings (0 minutes, 0 seconds) ===|

Edit: I installed useing 'sudo apt-get install libmagick++-dev' is that the correct way to do it? Ive only been useing linux for a few weeks.

carsten neumann
04-04-2013, 10:25 AM
This is not an OpenGL question, you should ask in a general C/C++ programming or CodeBlocks forum (you are more likely to get a useful answer there).

You need to instruct the compiler to look for headers in /usr/include/ImageMagick (you can deduce this by looking carefully what the compiler wants "Magick++/Include.h" so the path leading up to that suffix must be in it's header search path). I don't use CodeBlocks, but you should be able to extend the header search path somewhere under project or build options or something along those lines.

waffles
04-04-2013, 03:25 PM
This is not an OpenGL question, you should ask in a general C/C++ programming or CodeBlocks forum (you are more likely to get a useful answer there).

You need to instruct the compiler to look for headers in /usr/include/ImageMagick (you can deduce this by looking carefully what the compiler wants "Magick++/Include.h" so the path leading up to that suffix must be in it's header search path). I don't use CodeBlocks, but you should be able to extend the header search path somewhere under project or build options or something along those lines.

Thank you that solved the problem :)