Hi,
we use the EXTERNAL command, for example in this case: “EXTERNAL Deleted”. In the X# documentation https://www.xsharp.eu/help/command_external.html (in the old VO documentation is the same) this command is included, but it does not work in our app. We do not disable the default header and we have not used any other default header file, where is the error?
Error XS0103 The name 'EXTERNAL' does not exist in the current context.
Thanks
X# EXTERNAL is undeclared
X# EXTERNAL is undeclared
Christian Schmid
Re: X# EXTERNAL is undeclared
Hi Christian,
I think that's a leftover from the VO help topic. In .Net, you cannot link specific functions, it's the complete assembly (dll or exe) containing them that is either loaded or not. So practically this command is not needed anymore, as it's highly unlikely that a dll used in a macro expression is not already loaded when the macro is executed. And in the rare case that this indeed happens, all you need is to just call anything from this dll in advance, in order to force them to be loaded. For non-core dialect X# dlls, this is not needed at all, as those include some initialization code, which is silently called on app startup anyway.
In order to avoid having to modify your code, you can add this on top of the .prg files that use the EXTERNAL command:
#xcommand EXTERNAL [<list,...>] => NOP
or you can put it in Include\CustomDefs.xh\
I will open a ticket for this though, to update the help file and probably add the above command in the standard definitions file.
I think that's a leftover from the VO help topic. In .Net, you cannot link specific functions, it's the complete assembly (dll or exe) containing them that is either loaded or not. So practically this command is not needed anymore, as it's highly unlikely that a dll used in a macro expression is not already loaded when the macro is executed. And in the rare case that this indeed happens, all you need is to just call anything from this dll in advance, in order to force them to be loaded. For non-core dialect X# dlls, this is not needed at all, as those include some initialization code, which is silently called on app startup anyway.
In order to avoid having to modify your code, you can add this on top of the .prg files that use the EXTERNAL command:
#xcommand EXTERNAL [<list,...>] => NOP
or you can put it in Include\CustomDefs.xh\
I will open a ticket for this though, to update the help file and probably add the above command in the standard definitions file.
Chris Pyrgas
XSharp Development Team
chris(at)xsharp.eu
XSharp Development Team
chris(at)xsharp.eu
Re: X# EXTERNAL is undeclared
Hi Chris,
that's what I thought since I didn't find anything about it in the sources on GitHub. Since there are not many places, the code will be adapted accordingly.
Thanks
that's what I thought since I didn't find anything about it in the sources on GitHub. Since there are not many places, the code will be adapted accordingly.
Thanks
Christian Schmid