Compile not working

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Post Reply
jonotrain
Posts: 12
Joined: 2015-06-07T21:20:12-07:00
Authentication code: 6789

Compile not working

Post by jonotrain »

I had been using the same command line for compiling and it was working fine, but now all of a sudden I get the following error:
-bash: Magick++-config: command not found

The compile line I am using is as follows:

g++ -std=c++11 -I /usr/include/ -I /curlcpp/include -L /usr/lib -L /curlcpp/src `Magick++-config --cxxflags --cppflags` -O2 -o test test.cpp -lgmp -lcgicc `Magick++-config --ldflags --libs` -lcurlcpp -lcurl

Please let me know if you have any advice about how to fix this. Thank you!
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Compile not working

Post by fmw42 »

What version and platform? There was a recent issue with IM 6.9.10.45 and 7.0.8.45 that was fixed in ...46 version.

See
viewtopic.php?f=3&t=36024
viewtopic.php?f=3&t=36033
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: Compile not working

Post by snibgo »

jonotrain wrote:... but now all of a sudden I get the following error:
What has changed? A new version of IM? A new computer?
snibgo's IM pages: im.snibgo.com
jonotrain
Posts: 12
Joined: 2015-06-07T21:20:12-07:00
Authentication code: 6789

Re: Compile not working

Post by jonotrain »

I'm using OSX 10.10.5 - it's hard for me to check my imagemagick version because all of my bash magick commands are not working - but the dylib I have installed is libMagick++-6.Q16.8.dylib.

It's hard to say what caused it, but one thing I did recently is install mysql using homebrew, and I noticed that that changed my bash paths.
jonotrain
Posts: 12
Joined: 2015-06-07T21:20:12-07:00
Authentication code: 6789

Re: Compile not working

Post by jonotrain »

I'll add also that I have executables that call on the Magick++ libraries which are still working, but when I try to compile code it fails
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Compile not working

Post by fmw42 »

Does

Code: Select all

convert -version 
in a terminal window work?

How did you install ImageMagick? From Binary, from Homebrew or MacPorts or from source?
jonotrain
Posts: 12
Joined: 2015-06-07T21:20:12-07:00
Authentication code: 6789

Re: Compile not working

Post by jonotrain »

convert -version returns "-bash: convert: command not found" - and so does everything else I try related to magick.

If I remember correctly it was homebrew - but it might have been MacPorts.
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Compile not working

Post by fmw42 »

You might be using IM 7. So try

Code: Select all

magick -version
jonotrain
Posts: 12
Joined: 2015-06-07T21:20:12-07:00
Authentication code: 6789

Re: Compile not working

Post by jonotrain »

I also get " -bash: magick: command not found" for that
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Compile not working

Post by fmw42 »

Well, I think you need to remove it and re-install. But I am not an expert in installation. Homebrew is likely the easiest.
Post Reply