Page 1 of 1

Having problem compiling wif visual c++ 6

Posted: 2008-05-29T20:21:30-07:00
by silencer22
hi, i'm trying to compile the following code, but receive an error:

imagefile.cpp
c:\imagemagick-5.4.8\magick++\lib\magick++\include.h(13) : fatal error C1083: Cannot open include file: 'magick/magick_config.h': No such file or directory
Error executing cl.exe.


can any 1 help as tis is the first time i'm working wif magick++ n vc++ 6. i tried adding the magick folder to the library, but it could not find the file still...

any help would b greatly appreciated...

thx

Code: Select all

#include <stdio.h>
#include <assert.h>
#include <imagefile.h>

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

  printf("argc = %d\n", argc);
  assert(argc > 2);		// Invoke with a filename argument

  RGBAImage crl_image;
  ImageFile::read(argv[1], &crl_image);
  printf("top pixel is %d %d %d\n", crl_image(0,0,0), crl_image(0,0,1), crl_image(0,0,2));
  ImageFile::write(argv[2], &crl_image);

  
  return 0;
}

Re: Having problem compiling wif visual c++ 6

Posted: 2008-05-29T20:27:37-07:00
by magick
When you run the configure script it generates the magick_config.h header file. Use your file search panel to find it and include the path in your Visual C++ project configuration.

Re: Having problem compiling wif visual c++ 6

Posted: 2008-06-01T20:24:33-07:00
by silencer22
magick wrote:When you run the configure script it generates the magick_config.h header file. Use your file search panel to find it and include the path in your Visual C++ project configuration.

thx
that helps :D