[Magick-bugs] Compilation with VC6, TrimImage undefined

Marko Mahnic marko.mahnic at email.si
Sun Nov 26 12:45:35 CST 2006


I solved the problem.

Please add

   using MagickLib::TrimImage;

to

.\Magick++\lib\Magick++\Include.h, line 793

(sory, no diff).


Marko

Marko Mahnic wrote:
> Hi.
> 
> ImageMagick-6.3.0 (-3, -6), Compiling with VC 6.0 on WinXP, Core Duo.
> 
> --------------------Configuration: CORE_Magick++ - Win32 
> Debug--------------------
> Compiling...
> Image.cpp
> Magick lib DLL import interface
> Magick module DLL export interface
> MagickWand lib DLL import interface
> MagickWand module DLL export interface
> Magick++ lib DLL export
> C:\work\ImageMagick-6.3.0\Magick++\lib\Image.cpp(1809) : error C2065: 
> 'TrimImage' : undeclared identifier
> C:\work\ImageMagick-6.3.0\Magick++\lib\Image.cpp(1809) : error C2440: 
> 'initializing' : cannot convert from 'int' to 'struct MagickLib::_Image *'
>         Conversion from integral type to pointer type requires 
> reinterpret_cast, C-style cast or function-style cast
> Error executing cl.exe.
> -------------------------
> 
> If I add the extern definition from transform.h:
> 
>   extern MagickLib::Image *TrimImage(const MagickLib::Image 
> *,MagickLib::ExceptionInfo *);
> 
>   // Trim edges that are the background color from the image
>   void Magick::Image::trim ( void )
> 
> I get:
> 
> Linking...
>    Creating library ..\lib\CORE_DB_Magick++_.lib and object 
> ..\lib\CORE_DB_Magick++_.exp
> Image.obj : error LNK2001: unresolved external symbol "struct 
> MagickLib::_Image * __cdecl TrimImage(struct MagickLib::_Image const 
> *,struct MagickLib::_ExceptionInfo *)" 
> (?TrimImage@@YAPAU_Image at MagickLib@@PBU12 at PAU_ExceptionInfo@2@@Z)
> ..\bin\CORE_DB_Magick++_.dll : fatal error LNK1120: 1 unresolved externals
> Error executing link.exe.
> 
> 
> Marko
> 
> _______________________________________________
> Magick-bugs mailing list
> Magick-bugs at imagemagick.org
> http://studio.imagemagick.org/mailman/listinfo/magick-bugs
> 
> 




More information about the Magick-bugs mailing list