Author Topic: compile something with Magick++  (Read 6203 times)

Offline evilhomer

  • Single posting newcomer
  • *
  • Posts: 2
compile something with Magick++
« 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

Offline ollydbg

  • Developer
  • Lives here!
  • *****
  • Posts: 5913
  • OpenCV and Robotics
    • Chinese OpenCV forum moderator
Re: compile something with Magick++
« Reply #1 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
« Last Edit: May 21, 2010, 03:35:56 pm by ollydbg »
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.

Offline evilhomer

  • Single posting newcomer
  • *
  • Posts: 2
Re: compile something with Magick++
« Reply #2 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. ;-)

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7588
    • My Best Post
Re: compile something with Magick++
« Reply #3 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.
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 64 bit.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org