Page 1 of 1
Magick++ Namespace
Posted: 2010-08-01T22:04:15-07:00
by Archeleus
Hello, sorry if I missed the introductions thread but I'm Archeleus and I like tits.
Anyway short question here, I've installed ImageMagick and Magick++ which comes with it on my system, Debian Linux and also tried it on Ubuntu Debian, and I can get the include in eclipse with
But when I try
it tells me that there is no such namespace.
I kind of suspect my config file for this, but what do you guys think?
Cheers.
Re: Magick++ Namespace
Posted: 2010-08-01T23:09:30-07:00
by Archeleus
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
Re: Magick++ Namespace
Posted: 2010-08-02T06:14:25-07:00
by Archeleus
Bump.