in my ported VOWin32ApiLibrary (using not only the X# compiler, but also the X# runtime) I have a lot of warnings like this:
warning XS9043: Field 'F_ERROR' is ambiguous. Could be 'Functions.F_ERROR' or 'XSharp.Core.Functions.F_ERROR'. Using the first one. 316,8 LogFile.prg XSRVOWin32APILibrary
In this application, I have included the SDK_Defines.DLL, the XSharp.Core and the XSharp.VO libraries.
I would get rid of these warnings, but if I remove the SDK_Defines.DLL (that is causing these warnings, I think), my application does not compile anymore because it needs some defines from the SDK_Defines.DLL.
What can I do? Make a list of the missing defines and add them to my version of the Win32APILibrary?
P.S. I'm using this library in my ALPIlog application that is running in production with the X# runtime for a few weeks now
We have tried to add the defines to XSharp.Core and XSharp.VO that belong to the SystemLibrary in VO.
Other defines that are defined in the SDK libraries in Vulcan will go to the appropriate libraries in X# as well.
For now I would advise to just include SDK_DEFINES and ignore warning 9043.
I will talk with Chris if we can create a SDK_DEFINES.DLL with just the defines from the SDK libraries.
XSharp Development Team
Hmm, I suspect this could complicate things, because the VOXporter uses this dll as a source for all the available defines that exist in VO, need to check if removing some could cause some issues.
But in any case this SDK_Defines.dll is just a very temporary thing, after a month or two when the X# runtime will be fully completed we will not need it anymore and will delete it anyway, so for now I suggest simply disabling this warning to keep things simple.
but if the VO libraries are migrated, there are some defines needed. To compile them with X#, in some way these are to be defined.
I see only two possibilities: add these to the single libraries, or define a proper DLL that contains all these.
Personally, I would opt for the latter, but with a different name of course - otherwise the chaos would be complete.
Those defines will be part of each SDK dll, exactly as they are in VO as globally visible DEFINE entities, so they will be instantly available when you simply add a reference to that SDK dll, similar with all the functions and classes it contains.
So my error was to have been started from the Vulcan version of the library, and not from the VO one.
To remove all the warnings, it should be enough to generate a prg file from all defines in the VO version of the SDK, without porting the entire library.
I have now tried that and now I have only one error: the define _MAX_PATH is missing....
Exactly! About _MAX_PATH, this is defined in the Standard Library SDK, which has no equivalent in the Vulcan/X# SDK. Most of the functionality of this class is included in the "pure" runtime dlls, maybe we should add those defines there as well. For now, just define it somewhere in your app
the _MAX_PATH issue was not really an issue - found the value with Reflector, but I could also find it search my VO repository. It is only strange, because both constants, _MAX_PATH and MAX_PATH, have the same value a 260.
I have now copied the defines from the application I built from the VO version of the Win32API library to my X# application, and it compiles now without dependency to any other assembly (other than XSharp.Core and XSharp.VO).
Even the VO System classes compile now without dependency on the Vulcan runtime - only the X# runtime and the Win32API (X# version).