[Solved] PNG Export in BCB5

TeeChart VCL for Borland/CodeGear/Embarcadero RAD Studio, Delphi and C++ Builder.
Post Reply
to2
Newbie
Newbie
Posts: 39
Joined: Thu Jan 19, 2006 12:00 am

[Solved] PNG Export in BCB5

Post by to2 » Tue Mar 28, 2006 9:48 am

How can I use PNG Export in BCB?

Code: Select all

#include <TeePNG.hpp>
TPNGExportFormat* PNG = new TPNGExportFormat;
delete PNG;
This causes

[Linker Error] Unresolved external 'Teepng::TPNGExportFormat::' referenced from ...
[Linker Error] Unresolved external '__fastcall Teepng::TPNGExportFormat::TPNGExportFormat()' referenced from ...
Last edited by to2 on Thu Apr 06, 2006 3:17 pm, edited 1 time in total.

Pep
Site Admin
Site Admin
Posts: 3303
Joined: Fri Nov 14, 2003 5:00 am
Contact:

Post by Pep » Mon Apr 03, 2006 10:02 am

Hi,

you can do :

Code: Select all

#include "TeePNG.hpp"
#pragma link "TeePNG"


void __fastcall TForm1::FormCreate(TObject *Sender)
{
  TPNGExportFormat *png = new TPNGExportFormat;
  png->Panel=Chart1;
  png->PixelFormat=pf24bit;
  png->SaveToFile("d:test.png");
  png->Free();
}

to2
Newbie
Newbie
Posts: 39
Joined: Thu Jan 19, 2006 12:00 am

Post by to2 » Thu Apr 06, 2006 3:17 pm

Thank you, #pragma link "TeePNG" was the missing link.
Best Regards

Thomas

Post Reply