Error C1021: invalid preprocessor command 'warning'

I tried to configurate project to use ImageMagick library as described here

http://www.imagemagick.org/Magick++/Image.html

and I got the error C1021: invalid preprocessor command 'warning'

any idea what could this mean?

1
2
3
4
5
#if !defined(MAGICKCORE_QUANTUM_DEPTH) && defined(MAGICKCORE_QUANTUM_DEPTH_OBSOLETE_IN_H)
# warning "you should set MAGICKCORE_QUANTUM_DEPTH to sensible default set it to configure time default"
# warning "this is an obsolete behavior please fix your makefile"
# define MAGICKCORE_QUANTUM_DEPTH MAGICKCORE_QUANTUM_DEPTH_OBSOLETE_IN_H
#endif 


I did not write the code, this is in the magick-config.h
Your compiler doesn't recognize #warning as a valid preprocessor command.

You could try a couple of things:
1) Define MAGICKCORE_QUANTUM_DEPTH. That should cause the compiler to skip lines 2 and 3.
2) You could try changing #warning to #error #error is probably more widely recognized by compilers.
I have followed this advice:
http://www.imagemagick.org/discourse-server/viewtopic.php?f=23&t=22528
helped me to solve the problem, but I have many different errors now. Looks like some files are not included...

I got this errors
http://paste.ofcode.org/vwyABDCFZAsXYhUxXfTutY
does it indicate missing file or incorrect version of C++? I use C++03
Last edited on
┬┐what compiler are you using?
I think that that project is using gcc extensions
Ah, yes. I remember, they told it somewhere in reference. So I need to get the gcc extensions for windows. I am using Visual Studio Express.

In the "how to build" section they have:
Cygwin & GCC

It is possible to build both ImageMagick and Magick++ under the Cygwin Unix-emulation environment for Windows NT. Obtain and install Cgywin from http://www.cygwin.com/ . An X11R6 environment for Cygwin is available from http://www.cygwin.com/xfree/
Last edited on
Topic archived. No new replies allowed.