Page 1 of 1
Beta8 compiler error
Posted: Thu Dec 27, 2018 7:55 am
by Juraj
In my new application written in XS Core I use Errorhandler as an example of Wolfgang. The Beta7 compilation is OK. In Beta8 I get a XS1558 error ... I am attaching two screenschots and a small example.
Juraj
Beta8 compiler error
Posted: Thu Dec 27, 2018 8:47 am
by robert
Juraj,
We have changed the way the Start function gets called, to solve some problems that people reported with garbage collection before shutdown.
So we are now creating another kind of startup function, called __XsStart which contains the code to set the compiler options in the runtime and to clean up at the end.
Unfortunately this does now work well with the solution that you were using.
For now rename your start function to "__XsStart" and that should fix the problem. I will put this on the list of issues to fix for the next build.
Robert
Beta8 compiler error
Posted: Thu Dec 27, 2018 9:12 am
by Juraj
Hi Robert,
Thank you for the quick answer, after renaming the compilation is without error.
Still note about testing VS2019. If I try to open xaml file in VS2019, VS2019 freezes. WinForms, or PRG editor works OK, the problem is only when trying to edit the XAML file.
Juraj
Beta8 compiler error
Posted: Thu Dec 27, 2018 12:21 pm
by George
Hi,
I had a problem with X# 2.0.0.8 and the .Net Reactor obfuscator:
the obfuscated EXE that .Net Reactor V.5.0.0.0 procudes, didn't run.
it behaved like some DLL was missing.
Changing the Start() with __XsStart() it works.
Can you please check the .Net Reactor generated EXE as well ?
regards
George
Beta8 compiler error
Posted: Thu Dec 27, 2018 12:33 pm
by robert
George,
I don't have .Net Reactor.
Where can I download a version ?
Robert
Beta8 compiler error
Posted: Thu Dec 27, 2018 12:40 pm
by George
Robert,
https://www.eziriz.com/downloads.htm
please note I am using Vulcan dialect and the 2 Vulcan RT DLLs are included into the reactor file (attached here as sample).
George
Beta8 compiler error
Posted: Fri Dec 28, 2018 9:30 am
by Karl-Heinz
Hi Robert,
when i compile the structure with 2.0.0.8 a classvar modifier like PUBLIC must be added. But how does this work if a member needs a MarshalAs attribute ?
Code: Select all
STRUCTURE OSVERSIONINFOEX
PUBLIC dwOSVersionInfoSize AS DWORD
PUBLIC dwMajorVersion AS DWORD
PUBLIC dwMinorVersion AS DWORD
PUBLIC dwBuildNumber AS DWORD
PUBLIC dwPlatformId AS DWORD
[MarshalAs(UnmanagedType.ByValTStr, SizeConst := 128)] ;
szCSDVersion AS STRING
// PUBLIC [MarshalAs(UnmanagedType.ByValTStr, SizeConst:=128)] szCSDVersion AS STRING
PUBLIC wServicePackMajor AS WORD
PUBLIC wServicePackMinor AS WORD
PUBLIC wSuiteMask AS WORD
PUBLIC wProductType AS BYTE
PUBLIC wReserved AS BYTE
END STRUCTURE
i´ve tried several possibilties to insert "PUBLIC" , but it always ends up in a parser error
regards
Karl-Heinz
Beta8 compiler error
Posted: Fri Dec 28, 2018 9:44 am
by robert
Karl Heinz,
Attributes come before everything else. For example
STRUCTURE OSVERSIONINFOEX
[MarshallAs.....];
PUBLIC dwOSVersionInfoSize AS DWORD
PUBLIC dwMajorVersion AS DWORD
If you put the attribute on a separate line like in the example above then you need to end that line with a semi colon.
Robert
Beta8 compiler error
Posted: Fri Dec 28, 2018 11:13 am
by Karl-Heinz
Aaaaaaargh ...
got it.
thanks !
Beta8 compiler error
Posted: Mon Jan 07, 2019 12:43 pm
by George
Robert,
the Start() works if the assembly is Windows Service EXE:
// Start.prg
USING System
USING System.ServiceProcess
USING System.Diagnostics
FUNCTION Start() AS VOID
ServiceBase.Run(MyService{})
RETURN
regards
George