View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0004177 | JEDI VCL | 00 JVCL Components | public | 2007-07-11 06:56 | 2007-07-11 13:18 |
Reporter | Oleg | Assigned To | AHUser | ||
Priority | normal | Severity | minor | Reproducibility | always |
Status | resolved | Resolution | fixed | ||
Product Version | 3.32 | ||||
Target Version | Fixed in Version | 3.34 | |||
Summary | 0004177: JvThemes.pas generated header file is "incompatible" with some third party libraries | ||||
Description | Usage of unit "JvThemes" and its header file "JvThemes.hpp" is not possibe in C++ units if some third party libraries also used (ThemeSrv, Raize Components) - because constants "teButton" ... "twSmallFrameBottomSizingTemplate" declared differently, using enums (ThemeSrv, Raize) and using "#define" (in JVCL). For example: ---------------------------------------------------------------------------- file "RzThemeSrv.hpp" (from Raize 4.0.1): ... enum TThemedElement { teButton, teClock, teComboBox, teEdit, teExplorerBar, teHeader, teListView, teMenu, tePage, teProgress, teRebar, teScrollBar, teSpin, teStartPanel, teStatus, teTab, teTaskBand, teTaskBar, teToolBar, teToolTip, teTrackBar, teTrayNotify, teTreeview, teWindow }; ... ---------------------------------------------------------------------------- compiler errors: [C++ Error] RzThemeSrv.hpp(29): E2184 Enum syntax error Full parser context ... ...: #include ...\RzDBStat.hpp RzDBStat.hpp(13): #include ...\RzCommon.hpp RzCommon.hpp(17): #include ...\RzThemeSrv.hpp RzThemeSrv.hpp(26): namespace Rzthemesrv [C++ Error] RzThemeSrv.hpp(29): E2040 Declaration terminated incorrectly Full parser context ... ...: #include ...\RzDBStat.hpp RzDBStat.hpp(13): #include ...\RzCommon.hpp RzCommon.hpp(17): #include ...\RzThemeSrv.hpp RzThemeSrv.hpp(26): namespace Rzthemesrv [C++ Error] RzThemeSrv.hpp(29): E2190 Unexpected } Full parser context ... ...: #include ...\RzDBStat.hpp RzDBStat.hpp(13): #include ...\RzCommon.hpp RzCommon.hpp(17): #include ...\RzThemeSrv.hpp ---------------------------------------------------------------------------- This occured because unit "JvThemes.pas" declares constants such as: ---------------------------------------------------------------------------- const teButton = {$IFDEF COMPILER7_UP}Themes{$ELSE}ThemeSrv{$ENDIF}.teButton; ... twSmallFrameBottomSizingTemplate = {$IFDEF COMPILER7_UP}Themes{$ELSE}ThemeSrv{$ENDIF}.twSmallFrameBottomSizingTemplate; ---------------------------------------------------------------------------- which are then "translated" into header file as: ---------------------------------------------------------------------------- #define teButton (Themesrv::TThemedElement)(0) ... #define twSmallFrameBottomSizingTemplate (Themesrv::TThemedWindow)(116) ---------------------------------------------------------------------------- - the generated header file contains such declarations using "#define" directive, that leads to the conflict in later C++ declarations. | ||||
Tags | No tags attached. | ||||
|
The HPP files are generated by the compiler itself, we can't do much about that. And you could change the order of include files and get sorted. |
|
C++Builder 2007 generates static const Themes::TThemedElement teButton = (Themes::TThemedElement)(0); Despite this I have added the {$EXTERNALSYM xxx} for every enum alias. |
Date Modified | Username | Field | Change |
---|---|---|---|
2007-07-11 06:56 | Oleg | New Issue | |
2007-07-11 07:02 | obones | Note Added: 0013563 | |
2007-07-11 07:02 | obones | Status | new => feedback |
2007-07-11 13:17 | AHUser | Status | feedback => resolved |
2007-07-11 13:17 | AHUser | Fixed in Version | => Daily / SVN |
2007-07-11 13:17 | AHUser | Resolution | open => fixed |
2007-07-11 13:17 | AHUser | Assigned To | => AHUser |
2007-07-11 13:17 | AHUser | Note Added: 0013565 |