![]() |
Errors in XTP due to min/max macros |
Post Reply ![]() |
Author | |
akur ![]() Senior Member ![]() Joined: 16 May 2006 Status: Offline Points: 139 |
![]() ![]() ![]() ![]() ![]() Posted: 01 April 2009 at 3:58am |
Hello,
because of the currently running porting of our product to x64, we're starting to use constructs __min/__max all over in our code base instead of historic min/max macros. This is an easy replacement to do in our own sources. But since XTP sources also use these old min/max macros and we do not wish to modify XTP sources (to keep version upgrade maintenance low), we're forced to apply the macro NOMINMAX to XTP sources. However, introducing this macro in header files makes the _order_ in which headers are included into sources very error-prone - an incorrect order of includes could then lead to XTP compilation errors like these: xtremetoolkitpro\source\common\XTPVC50Helpers.h(569) : error C3861: 'min': identifier not found xtremetoolkitpro\source\common\XTPVC50Helpers.h(569) : error C3861: 'max': identifier not found xtremetoolkitpro\source\reportcontrol\XTPReportControl.h(3504) : error C3861: 'max': identifier not found xtremetoolkitpro\source\calendar\XTPCalendarUtils.h(1022) : error C3861: 'min': identifier not found xtremetoolkitpro\source\calendar\XTPCalendarPaintManager.h(1272) : error C3861: 'min': identifier not found xtremetoolkitpro\source\calendar\XTPCalendarTimeLineViewTimeScale.h(221) : error C3861: 'max': identifier not found xtremetoolkitpro\source\syntaxedit\XTPSyntaxEditDrawTextProcessor.h(511) : error C3861: 'max': identifier not found That's why we would like to have a free order of includes so that the order is independent of whether min/max is used in some of them or not. To achive this, it would be great to have these replacements done directly by CodeJock. Could you please replace the usage of min/max macros in XTP sources with __min/__max versions? Thank you, in advance! |
|
![]() |
|
Oleg ![]() Admin Group ![]() Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
![]() ![]() ![]() ![]() ![]() |
Hello,
You can just add
#define max __max
#undef max
before and after you include toolkit in stdafx.h
And btw what point to replace max to __max. What problem with max ?
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
![]() |
Post Reply ![]() |
|
Tweet
|
Forum Jump | Forum Permissions ![]() You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |