Quantcast
Channel: Embarcadero Community - Embarcadero Community
Viewing all articles
Browse latest Browse all 1888

64-bit C++: Unresolved external 'Vcl::Graphics::TMetafileCanvas::TMetafileCanvas

$
0
0

 

Once in a while with new updates of the C++-Builder (and then quite long-living) there pops-up a problem with the linking of the TMetafileCanvas procedure (X2...). Now a  déjà-vu appears while linking with CX in 64-bit mode.

 

Test to this effect just create a new VCL-Project with a button on the form and insert the following code in the click-handler:

 

void __fastcall TForm1::Button1Click(TObject *Sender)
{
 Clipboard()->Clear();

 

 TMetafile* pMF = NULL;
 TMetafileCanvas* pMFC = NULL;
 try {
  pMF = new TMetafile();
  pMF->Width = Width;
  pMF->Height = Height;

 

  pMFC = new TMetafileCanvas(pMF, Canvas->Handle, UnicodeString("RAD Studio CX"), UnicodeString("Testing CX"));

 

  pMFC->Brush->Color = clBlue;
  TRect aRect;
  aRect.Left = 20;
  aRect.Top = 10;
  aRect.Right = Width-30;
  aRect.Bottom = Height-50;
  pMFC->FillRect(aRect);

 

  delete pMFC;

 

  Clipboard()->Assign(pMF);

 

  delete pMF;
 }
 catch (...) {
  delete pMFC;
  delete pMF;
 }
}

 

Whereas the 32-bit code works the 64-bit linker outputs:

 

[ilink64 Fehler] Error: Unresolved external 'Vcl::Graphics::TMetafileCanvas::TMetafileCanvas(Vcl::Graphics::TMetafile*, HDC__*, System::UnicodeString, System::UnicodeString)' referenced from xxx

 

What would be a solution to this problem?

 

 

 

 

 


Viewing all articles
Browse latest Browse all 1888

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>