ImageEn for Delphi and C++ Builder ImageEn for Delphi and C++ Builder

 

ImageEn Forum
Profile    Join    Active Topics    Forum FAQ    Search this forumSearch
Forum membership is Free!  Click Join to sign-up
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 ImageEn Library for Delphi, C++ and .Net
 ImageEn and IEvolution Support Forum
 Compilation error using C++ Builder
 New Topic  Reply to Topic
Author Previous Topic Topic Next Topic  

ylebel

2 Posts

Posted - Jan 06 2016 :  15:34:12  Show Profile  Reply
In C++ Builder (I'm using version 2007), if you drop a TImageEnView on a form, you are at risk of having this compilation error:

[C++ Error] Hyieutils.hpp(3345, 54): E2189 extern variable cannot be initialized

The line in question is :

extern PACKAGE void __fastcall IEDrawComboListBoxItem(Controls::TWinControl* TheControl, const Types::TRect &CanvasRect, const AnsiString sText, Controls::TImageList* AnImageList = (Controls::TImageList*)(0x0), short iGlyph = (short)(0xffffffff));


Problem happens if one of the other components on the form is using DesignIntf and DesignEditors. Somewhere in the include chain, the C++ Builder file ToolsAPI.hpp is included. This file defines the following macro:

#define sText "Text"


So there's a conflict between the sText parameter of the IEDrawComboListBoxItem function and the C++ Builder sText macro.

A very easy way to reproduce the problem (at least when using C++ Builder 2007) is to drop a TImageEnView on a form and include the ToolsAPI.hpp file just before the ieview.hpp and imageenview.hpp files:

#include <Toolsapi.hpp>
#include "ieview.hpp"
#include "imageenview.hpp"


Can you fix that? All you have to do is to change the name of the sText parameter to something else (like TheText). The same error is present in the following files:

hyieutils.hpp
ImageEnProc.hpp
iexMetaHelpers.hpp
ImageEnView.hpp

Thanks.

Yannick

xequte

38947 Posts

Posted - Jan 06 2016 :  17:36:12  Show Profile  Reply
Hi Yannick

We'll look into that.


Nigel
Xequte Software
www.xequte.com
nigel@xequte.com
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
Jump To: