Code::Blocks Forums

User forums => Using Code::Blocks => Topic started by: evilhomer on May 21, 2010, 03:17:34 pm

Title: compile something with Magick++
Post by: evilhomer on May 21, 2010, 03:17:34 pm
Hi everybody,

i want to compile a small text application which use Magick++ but i became a lot of linker errors.

i have allready add all libs from C:\Programme\ImageMagick-6.6.1-Q16\lib\ under the linke settings but without any effect.

her is the code
Code
#include <Magick++.h>
#include <stdio.h>
#include <dirent.h>
#include <string.h>
#include <stdlib.h>
#include <time.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <unistd.h>

using namespace Magick;

int main( int argc, char **argv )
{
    InitializeMagick(*argv);

    Image oImage;
    oImage.read( "test.jpg" );
    oImage.zoom( Geometry("200x200") );
    oImage.read( "test_out.jpg" );
    return 0;
}

but the compiler says:
C:\Dokumente und Einstellungen\userbane\Eigene Dateien\c.devel\scaleimage\main.cpp|15|undefined reference to `Magick::InitializeMagick(char const*)'|
....

hope somebody can help - i use windows XP.... when it is interessting for the solution... normaly i work under linux but for that it is nessary that i use windows
Title: Re: compile something with Magick++
Post by: ollydbg on May 21, 2010, 03:30:16 pm
Don't put the file in some folders has spaces.  Why not ask this question on the Magick++'s forum or maillist.
And also, this is not a problem related to C::B. :D
Title: Re: compile something with Magick++
Post by: evilhomer on May 21, 2010, 03:47:16 pm
i dont thing that the whitespace are the problem....
...i ask that issue here because it seems that i miss to link something...

i think somebody here has compield something with Magick++ in c::b or?
And i hope this guy will read this and can help me. ;-)
Title: Re: compile something with Magick++
Post by: stahta01 on May 21, 2010, 04:34:05 pm
Turn on FULL Compiler Logging and ask your question with the people who support your Library.
http://wiki.codeblocks.org/index.php?title=FAQ#Q:_How_do_I_troubleshoot_an_compiler_problem.3F

Tim S.