I managed to fix that issue. Just some broken packages lying around that confused it.
Now I've another problem. The linker doesn't seem to want to link.
I'm getting shitloads of "Undefined Reference" errors.
Here are the commands that it used :
Code: Select all
g++ -O3 -Wall -c -fmessage-length=0 -MMD -MP -MF"main.d" -MT"main.d" -o"main.o" "../main.cpp"
g++ -o"magick" ./main.o
Whenever I had past issues like this I had to add something to the linker. So can anyone of you please tell me what I should add?
EDIT :
My code :
Code: Select all
#include <iostream>
#include <ImageMagick/Magick++.h>
using namespace std;
using namespace Magick;
int main(int argc, char **argv){
Image this_image("10x10");
return 0;
}
Errors :
Code: Select all
make all
Building file: ../main.cpp
Invoking: GCC C++ Compiler
g++ -O0 -g3 -Wall -c -fmessage-length=0 -MMD -MP -MF"main.d" -MT"main.d" -o"main.o" "../main.cpp"
Finished building: ../main.cpp
Building target: imagemagick_test
Invoking: GCC C++ Linker
g++ -L/usr/include/ImageMagick/Magick++ -o"imagemagick_test" ./main.o
./main.o: In function `main':
../workspace/imagemagick_test/Debug/../main.cpp:14: undefined reference to `Magick::Image::Image(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'
../workspace/imagemagick_test/Debug/../main.cpp:15: undefined reference to `Magick::Image::~Image()'
../workspace/imagemagick_test/Debug/../main.cpp:14: undefined reference to `Magick::Image::~Image()'
collect2: ld returned 1 exit status
make: *** [imagemagick_test] Error 1