I have one more question, this time regarding use with Windows [XP]. I installed ImageMagick without a problem using the automated installer, but as with my Linux installation, the compiler doesn't find Magick++.h.
Code: Select all
Magick++.h: No such file or directory
I'm using the Dev-C++ IDE which itself uses g++/MingW as its compiler. Do the steps above have counterparts that apply to Windows?
Any suggestions would be appreciated! Thanks in advance~
---
Edit: On the
second-to-last page of a forum search for "windows install", I came across
a helpful post by el_supremo:
el_supremo wrote:[Y]ou have to point the compiler at the include and lib directories. This will depend upon the compiler/IDE you are using. . . . but the steps are probably similar anyway:
Right click on the project name and select Properties and then modify the following options:
- In C/C++|General: In "Additional Include Directories" add the path to your include directory - something like "C:\Program Files\ImageMagick-6.3.0-Q16\include"
- In Linker|General: Add the additional library directory C:\Program Files\ImageMagick-6.3.0-Q16\lib
- In Linker|Input: Add the Additional Dependencies CORE_RL_magick_.lib CORE_RL_wand_.lib CORE_RL_Magick++_.lib
Adding the
include and
lib directories, along with including
Magick++.h at the
top of my C++ source (above
iostream and the rest), fixed the missing file errors.
I'm still getting one error however, which may or may not be connected to the third step above which I couldn't figure out how to implement. Here is the full compiler log through Dev-C++:
Code: Select all
Executing g++.exe...
g++.exe "C:\Documents and Settings\taylor\Desktop\Programming\magickplusplus.cpp." -o "C:\Documents and Settings\taylor\Desktop\Programming\magickplusplus.exe" -I"C:\Dev-Cpp\lib\gcc\mingw32\3.4.2\include" -I"C:\Dev-Cpp\include\c++\3.4.2\backward" -I"C:\Dev-Cpp\include\c++\3.4.2\mingw32" -I"C:\Dev-Cpp\include\c++\3.4.2" -I"C:\Dev-Cpp\include" -I"C:\Program Files\ImageMagick-6.4.7-Q16\include" -L"C:\Dev-Cpp\lib" -L"C:\Program Files\ImageMagick-6.4.7-Q16\lib"
In file included from C:/Dev-Cpp/include/stdio.h:399,
from C:/Program Files/ImageMagick-6.4.7-Q16/include/Magick++/Include.h:22,
from C:/Program Files/ImageMagick-6.4.7-Q16/include/Magick++.h:9,
from C:\Documents and Settings\taylor\Desktop\Programming\magickplusplus.cpp:1:
C:/Dev-Cpp/include/sys/types.h:104: error: redeclaration of C++ built-in type `long'
Execution terminated
Thanks for taking the time to help.