warning when using imagemagick

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
haoxuan199307
Posts: 4
Joined: 2017-09-29T20:02:28-07:00
Authentication code: 1151

warning when using imagemagick

Post by haoxuan199307 » 2017-09-30T09:57:52-07:00

I tried to use imagemagick in Linux. I installed it by using
sudo apt-get install libmagick++-dev

when I run make:

Code: Select all

g++ -g -Wall -std=c++0x -I/usr/include/ImageMagick-6 -c ../src/main.cpp -o main.o -I../include
In file included from /usr/include/ImageMagick-6/Magick++/Include.h:13:0,
                 from /usr/include/ImageMagick-6/Magick++.h:9,
                 from ../include/ogldev_texture.h:25,
                 from ../include/object.h:13,
                 from ../include/graphics.h:10,
                 from ../include/engine.h:8,
                 from ../src/main.cpp:4:
/usr/include/ImageMagick-6/magick/magick-config.h:29:3: warning: #warning "you should set MAGICKCORE_QUANTUM_DEPTH to sensible default set it to configure time default" [-Wcpp]
 # warning "you should set MAGICKCORE_QUANTUM_DEPTH to sensible default set it t
   ^
/usr/include/ImageMagick-6/magick/magick-config.h:30:3: warning: #warning "this is an obsolete behavior please fix your makefile" [-Wcpp]
 # warning "this is an obsolete behavior please fix your makefile"
   ^
/usr/include/ImageMagick-6/magick/magick-config.h:52:3: warning: #warning "you should set MAGICKCORE_HDRI_ENABLE to sensible default set it to configure time default" [-Wcpp]
 # warning "you should set MAGICKCORE_HDRI_ENABLE to sensible default set it to 
   ^
/usr/include/ImageMagick-6/magick/magick-config.h:53:3: warning: #warning "this is an obsolete behavior please fix yours makefile" [-Wcpp]
 # warning "this is an obsolete behavior please fix yours makefile"
   ^
g++ -g -Wall -std=c++0x -I/usr/include/ImageMagick-6 -c ../src/camera.cpp -o camera.o -I../include
g++ -g -Wall -std=c++0x -I/usr/include/ImageMagick-6 -c ../src/engine.cpp -o engine.o -I../include
In file included from /usr/include/ImageMagick-6/Magick++/Include.h:13:0,
                 from /usr/include/ImageMagick-6/Magick++.h:9,
                 from ../include/ogldev_texture.h:25,
                 from ../include/object.h:13,
                 from ../include/graphics.h:10,
                 from ../include/engine.h:8,
                 from ../src/engine.cpp:2:
/usr/include/ImageMagick-6/magick/magick-config.h:29:3: warning: #warning "you should set MAGICKCORE_QUANTUM_DEPTH to sensible default set it to configure time default" [-Wcpp]
 # warning "you should set MAGICKCORE_QUANTUM_DEPTH to sensible default set it t
   ^
/usr/include/ImageMagick-6/magick/magick-config.h:30:3: warning: #warning "this is an obsolete behavior please fix your makefile" [-Wcpp]
 # warning "this is an obsolete behavior please fix your makefile"
   ^
/usr/include/ImageMagick-6/magick/magick-config.h:52:3: warning: #warning "you should set MAGICKCORE_HDRI_ENABLE to sensible default set it to configure time default" [-Wcpp]
 # warning "you should set MAGICKCORE_HDRI_ENABLE to sensible default set it to 
   ^
/usr/include/ImageMagick-6/magick/magick-config.h:53:3: warning: #warning "this is an obsolete behavior please fix yours makefile" [-Wcpp]
 # warning "this is an obsolete behavior please fix yours makefile"
   ^
g++ -g -Wall -std=c++0x -I/usr/include/ImageMagick-6 -c ../src/graphics.cpp -o graphics.o -I../include
In file included from /usr/include/ImageMagick-6/Magick++/Include.h:13:0,
                 from /usr/include/ImageMagick-6/Magick++.h:9,
                 from ../include/ogldev_texture.h:25,
                 from ../include/object.h:13,
                 from ../include/graphics.h:10,
                 from ../src/graphics.cpp:1:
/usr/include/ImageMagick-6/magick/magick-config.h:29:3: warning: #warning "you should set MAGICKCORE_QUANTUM_DEPTH to sensible default set it to configure time default" [-Wcpp]
 # warning "you should set MAGICKCORE_QUANTUM_DEPTH to sensible default set it t
   ^
/usr/include/ImageMagick-6/magick/magick-config.h:30:3: warning: #warning "this is an obsolete behavior please fix your makefile" [-Wcpp]
 # warning "this is an obsolete behavior please fix your makefile"
   ^
/usr/include/ImageMagick-6/magick/magick-config.h:52:3: warning: #warning "you should set MAGICKCORE_HDRI_ENABLE to sensible default set it to configure time default" [-Wcpp]
 # warning "you should set MAGICKCORE_HDRI_ENABLE to sensible default set it to 
   ^
/usr/include/ImageMagick-6/magick/magick-config.h:53:3: warning: #warning "this is an obsolete behavior please fix yours makefile" [-Wcpp]
 # warning "this is an obsolete behavior please fix yours makefile"
   ^
g++ -g -Wall -std=c++0x -I/usr/include/ImageMagick-6 -c ../src/object.cpp -o object.o -I../include
In file included from /usr/include/ImageMagick-6/Magick++/Include.h:13:0,
                 from /usr/include/ImageMagick-6/Magick++.h:9,
                 from ../include/ogldev_texture.h:25,
                 from ../include/object.h:13,
                 from ../src/object.cpp:1:
/usr/include/ImageMagick-6/magick/magick-config.h:29:3: warning: #warning "you should set MAGICKCORE_QUANTUM_DEPTH to sensible default set it to configure time default" [-Wcpp]
 # warning "you should set MAGICKCORE_QUANTUM_DEPTH to sensible default set it t
   ^
/usr/include/ImageMagick-6/magick/magick-config.h:30:3: warning: #warning "this is an obsolete behavior please fix your makefile" [-Wcpp]
 # warning "this is an obsolete behavior please fix your makefile"
   ^
/usr/include/ImageMagick-6/magick/magick-config.h:52:3: warning: #warning "you should set MAGICKCORE_HDRI_ENABLE to sensible default set it to configure time default" [-Wcpp]
 # warning "you should set MAGICKCORE_HDRI_ENABLE to sensible default set it to 
   ^
/usr/include/ImageMagick-6/magick/magick-config.h:53:3: warning: #warning "this is an obsolete behavior please fix yours makefile" [-Wcpp]
 # warning "this is an obsolete behavior please fix yours makefile"
   ^
g++ -g -Wall -std=c++0x -I/usr/include/ImageMagick-6 -c ../src/shader.cpp -o shader.o -I../include
g++ -g -Wall -std=c++0x -I/usr/include/ImageMagick-6 -c ../src/window.cpp -o window.o -I../include
g++ -g -Wall -std=c++0x -I/usr/include/ImageMagick-6 -o Tutorial main.o camera.o engine.o graphics.o object.o shader.o window.o -lSDL2 -lGLEW -lGL -lassimp -lMagickCore-6.Q16 #



Makefile:

Code: Select all

# Check for OS Type
UNAME_S := $(shell uname -s)

# Linux
ifeq ($(UNAME_S), Linux)
	CC=g++
	LIBS=-lSDL2 -lGLEW -lGL -lassimp -lMagickCore-6.Q16
# Mac
else
	CC=clang++
	LIBS=-lSDL2 -framework OpenGL -framework Cocoa -lGLEW -stdlib=libc++
endif

# Paths, use this to set Include directories, or library directories; uncomment in all: if used
#PATHI=-I/usr/local/include/ 
#PATHL=-L/usr/local/lib/

#Compiler Flags
CXXFLAGS=-g -Wall -std=c++0x -I/usr/include/ImageMagick-6

# .o Compilation
O_FILES=main.o camera.o engine.o graphics.o object.o shader.o window.o

# Point to includes of local directories
INDLUDES=-I../include


all: $(O_FILES)
	$(CC) $(CXXFLAGS) -o Tutorial $(O_FILES) $(LIBS) #$(PATHI) $(PATHL)

main.o: ../src/main.cpp
	$(CC) $(CXXFLAGS) -c ../src/main.cpp -o main.o $(INDLUDES)

camera.o: ../src/camera.cpp
	$(CC) $(CXXFLAGS) -c ../src/camera.cpp -o camera.o $(INDLUDES)

engine.o: ../src/engine.cpp
	$(CC) $(CXXFLAGS) -c ../src/engine.cpp -o engine.o $(INDLUDES)

graphics.o: ../src/graphics.cpp
	$(CC) $(CXXFLAGS) -c ../src/graphics.cpp -o graphics.o $(INDLUDES)
object.o: ../src/object.cpp
	$(CC) $(CXXFLAGS) -c ../src/object.cpp -o object.o $(INDLUDES)

shader.o: ../src/shader.cpp
	$(CC) $(CXXFLAGS) -c ../src/shader.cpp -o shader.o $(INDLUDES)

window.o: ../src/window.cpp
	$(CC) $(CXXFLAGS) -c ../src/window.cpp -o window.o $(INDLUDES)

ogldev_texture.o: ../src/ogldev_texture.cpp
	$(CC) $(CXXFLAGS) -c ../src/ogldev_texture.cpp -o ogldev_texture.o $(INDLUDES)

clean:
	-@if rm *.o Tutorial 2>/dev/null || true; then echo "Main Removed"; else echo "No Main"; fi
Last edited by haoxuan199307 on 2017-09-30T13:46:59-07:00, edited 1 time in total.

snibgo
Posts: 9258
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: warning when using imagemagick

Post by snibgo » 2017-09-30T10:33:54-07:00

What IM includes do you have in your main.cpp? For cpp programs, I use:

Code: Select all

#include "Magick++.h"
snibgo's IM pages: im.snibgo.com

haoxuan199307
Posts: 4
Joined: 2017-09-29T20:02:28-07:00
Authentication code: 1151

Re: warning when using imagemagick

Post by haoxuan199307 » 2017-09-30T13:45:26-07:00

snibgo wrote:
2017-09-30T10:33:54-07:00
What IM includes do you have in your main.cpp? For cpp programs, I use:

Code: Select all

#include "Magick++.h"
#include <ImageMagick-6/Magick++.h>

Post Reply