Chris,
I thought about that too, but that only works when a customer (re)opens and saves all the forms.
Robert
Constant redefinition warnings RX4005 when working in VO Windows-Editor
Constant redefinition warnings RX4005 when working in VO Windows-Editor
XSharp Development Team
The Netherlands
robert@xsharp.eu
The Netherlands
robert@xsharp.eu
Constant redefinition warnings RX4005 when working in VO Windows-Editor
Robert,
i'm certainly not qualified to comment - but "more control" always sounds good to me.
If your 5) would possibly allow including 4), i.e. making the proces smarter, i'd vote for it.
i'm certainly not qualified to comment - but "more control" always sounds good to me.
If your 5) would possibly allow including 4), i.e. making the proces smarter, i'd vote for it.
Regards
Karl
(on Win8.1/64, Xide32 2.20, X#2.20.0.3)
Karl
(on Win8.1/64, Xide32 2.20, X#2.20.0.3)
- ArneOrtlinghaus
- Posts: 412
- Joined: Tue Nov 10, 2015 7:48 am
- Location: Italy
Constant redefinition warnings RX4005 when working in VO Windows-Editor
Chris,
we tested with the newest version of the VOXPorter we have. It writes the constants as decimal values and not as hex values.
Arne
we tested with the newest version of the VOXPorter we have. It writes the constants as decimal values and not as hex values.
Arne
-
- Posts: 142
- Joined: Mon Jul 25, 2016 3:58 pm
- Location: Italy
Constant redefinition warnings RX4005 when working in VO Windows-Editor
At the moment the VOXPorter defines the values as int. It is read in the array of xPorter.SDKDefines[cUpper] as string. In theory it is possible to convert it to a int64 and format it as a hexstring in Generate_Resources in the following case
CASE xPorter.SDKDefines:ContainsKey(cUpper)
Hansjörg
CASE xPorter.SDKDefines:ContainsKey(cUpper)
Hansjörg
Constant redefinition warnings RX4005 when working in VO Windows-Editor
Guys,
Regardless of what the XPorter does, I will add a setting to the project file (and in the project settings dialog) in the next build that allows you to suppress warnings from the resource compiler about duplicate defines (RC4005)
What should the default be:
- suppress the warnings ?
- show the warnings ?
Robert
Regardless of what the XPorter does, I will add a setting to the project file (and in the project settings dialog) in the next build that allows you to suppress warnings from the resource compiler about duplicate defines (RC4005)
What should the default be:
- suppress the warnings ?
- show the warnings ?
Robert
XSharp Development Team
The Netherlands
robert@xsharp.eu
The Netherlands
robert@xsharp.eu
- ArneOrtlinghaus
- Posts: 412
- Joined: Tue Nov 10, 2015 7:48 am
- Location: Italy
Constant redefinition warnings RX4005 when working in VO Windows-Editor
In my opinion the duplicate constant warning from the resource compiler is not critical, as the constants are defined just there locally. So the default could be "Suppress".
Arne
Arne
Constant redefinition warnings RX4005 when working in VO Windows-Editor
I agree, it's best to suppress the warnings by default.
Chris Pyrgas
XSharp Development Team
chris(at)xsharp.eu
XSharp Development Team
chris(at)xsharp.eu
Constant redefinition warnings RX4005 when working in VO Windows-Editor
Hansjörg was able to fix this problem. First, he updated the source of the VOXPorter. That had no effect on the created .rc files. After debugging the VOXPorter, we were able to identify the source of the problem and fix it. Hansjörg changed the following Line from
to
By doing so, the defines in the .rc files changed from
to
Since the define numbers format is now equal to the format, that the form designer generates, the warnings disappeared.
Code: Select all
aDefines:Add(cUpper , String.Format("#define {0} {1}" , cWord , cValue))
Code: Select all
aDefines:Add(cUpper , String.Format("#define {0} 0x{1:x8}" , cWord , Int64.Parse(cValue)))
Code: Select all
#define WS_CHILD 1073741824
Code: Select all
#define WS_CHILD 0x40000000
Constant redefinition warnings RX4005 when working in VO Windows-Editor
Hi Volkmar,
That's a good idea, will update also the standard VOXporter code to emit values in hex format.
But in any case, by default VOXporter (at least the version that is available since some months ago) does not emit #define statements anyway at all, it instead uses the actual values everywhere they are needed in the resource files. This was done in order to avoid similar problems to the one we are discussing now, and this feature can be disabled by unchecking the option "ReplaceResourceDefinesWithValues"
That's a good idea, will update also the standard VOXporter code to emit values in hex format.
But in any case, by default VOXporter (at least the version that is available since some months ago) does not emit #define statements anyway at all, it instead uses the actual values everywhere they are needed in the resource files. This was done in order to avoid similar problems to the one we are discussing now, and this feature can be disabled by unchecking the option "ReplaceResourceDefinesWithValues"
Chris Pyrgas
XSharp Development Team
chris(at)xsharp.eu
XSharp Development Team
chris(at)xsharp.eu