Help with compiling imagemagick under Borland Builderc++6

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Post Reply
stikhs

Help with compiling imagemagick under Borland Builderc++6

Post by stikhs »

#include <vcl.h>
#pragma hdrstop

#include "Unit1.h"
#include <Magick++.h>
#include <stdio.h>
#include <time.h>
#include <sys\types.h>
#ifndef WIN32
#define WIN32
#endif
#include <iostream>
//---------------------------------------------------------------------------
#pragma package(smart_init)
#pragma resource "*.dfm"

TForm1 *Form1;
using namespace std;
using namespace Magick;
//---------------------------------------------------------------------------
__fastcall TForm1::TForm1(TComponent* Owner)
: TForm(Owner)
{
}
//---------------------------------------------------------------------------

void __fastcall TForm1::Button1Click(TObject *Sender)
{
Image image;

// Read a file into image object
image.read( "D:\Program
Files\Borland\CBuilder6\Projects\IVUS\temp_pictures\antonis1.jpg" );

// Crop the image to specified size (width, height, xOffset, yOffset)
image.crop( Geometry(100,100, 100, 100) );

// Write the image to a file
image.write( "D:\Program
Files\Borland\CBuilder6\Projects\IVUS\temp_pictures\tonio1.jpg" );
}
The above is a sample piece of code which i wrote with
imagemagick.When i try to compile it i get these errors for example:

[Linker Error] Unresolved external 'Magick::Image::read(const
_STL::basic_string<char, _STL::char_traits<char>,
_STL::allocator<char> >&)' referenced from D:\PROGRAM
FILES\BORLAND\CBUILDER6\PROJECTS\TEST\UNIT1.OBJ

I can't figure out what's the problem so please if anyone could help
me i 'd be really happy to know.

P.S.Is there anyone who successfully run IM with Borland?
pif1709

Re: Help with compiling imagemagick under Borland Builderc++6

Post by pif1709 »

Try to use namespace std
Post Reply