News:

The new Release 25.03 is out! You can download binaries for Windows and many major Linux distros here .

Main Menu

compile something with Magick++

Started by evilhomer, May 21, 2010, 03:17:34 PM

Previous topic - Next topic

evilhomer

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

#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

ollydbg

#1
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
If some piece of memory should be reused, turn them to variables (or const variables).
If some piece of operations should be reused, turn them to functions.
If they happened together, then turn them to classes.

evilhomer

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. ;-)

stahta01

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.
C Programmer working to learn more about C++.
On Windows 10 64 bit and Windows 11 64 bit.
--
When in doubt, read the CB WiKi FAQ. [url="http://wiki.codeblocks.org"]http://wiki.codeblocks.org[/url]