Page 1 of 1

error while using ImageMagick in VS2012 - 'identifier not found'

Posted: 2015-06-03T09:22:22-07:00
by robberjohn
I'm trying to use ImageMagick Library for a C Project in VS2012. I installed the Library from here: http://www.imagemagick.org/script/binary-releases.php

Then in my Project, I added D:\Program Files (x86)\ImageMagick-6.9.1-Q16\include\ to the include folders. Then I tried to use Magick with an example code from here:
http://www.imagemagick.org/script/magick-core.php

Code: Select all

#include <stdio.h>
#include <string.h>
#include <time.h>
#include <sys/types.h>
#include <magick/api.h>

int main(int argc,char **argv)
{
InitializeMagick(*argv);
GetExceptionInfo(&exception);
... ...
}
Then VS2012 returns errors when I try to compile:

Code: Select all

error C3861: “InitializeMagick”: identifier not found
error C3861: “GetExceptionInfo”: identifier not found
error C3861: “DestroyMagick”: identifier not found
Is there any steps I missed?

Thanks very much for your help!

Re: error while using ImageMagick in VS2012 - 'identifier not found'

Posted: 2015-06-03T09:47:11-07:00
by magick
For an initial project, download http://www.imagemagick.org/source/core.c.

Re: error while using ImageMagick in VS2012 - 'identifier not found'

Posted: 2015-06-04T00:17:55-07:00
by robberjohn
Actually, I want to use the function "GetMagickPixelPacket", “InitializeMagick” and “GetExceptionInfo” in another project, can you tell me where the mistake is?