Page 1 of 1

Help with compiling imagemagick under Borland Builderc++6

Posted: 2007-02-13T03:40:00-07:00
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?

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

Posted: 2009-02-11T01:27:11-07:00
by pif1709
Try to use namespace std