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

 

ImageEn Forum
Profile    Join    Active Topics    Forum FAQ    Search this forumSearch
 All Forums
 ImageEn Library for Delphi, C++ and .Net
 ImageEn and IEvolution Support Forum
 Compilation error using C++ Builder

Note: You must be registered in order to post a reply.
To register, click here. Registration is FREE!

View 
UserName:
Password:
Format  Bold Italicized Underline  Align Left Centered Align Right  Horizontal Rule  Insert Hyperlink   Browse for an image to attach to your post Browse for a zip to attach to your post Insert Code  Insert Quote Insert List
   
Message 

 

Emoji
Smile [:)] Big Smile [:D] Cool [8D] Blush [:I]
Tongue [:P] Evil [):] Wink [;)] Black Eye [B)]
Frown [:(] Shocked [:0] Angry [:(!] Sleepy [|)]
Kisses [:X] Approve [^] Disapprove [V] Question [?]

 
Check here to subscribe to this topic.
   

T O P I C    R E V I E W
ylebel Posted - Jan 06 2016 : 15:34:12
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
1   L A T E S T    R E P L I E S    (Newest First)
xequte Posted - Jan 06 2016 : 17:36:12
Hi Yannick

We'll look into that.


Nigel
Xequte Software
www.xequte.com
nigel@xequte.com