fbpx
Welcome, Guest
Username: Password: Remember me
Welcome to the XSharp forum!

Tell us and our members who you are, what you like and why you became a member of this site.
We welcome all new members and hope to see you around a lot!
  • Page:
  • 1

TOPIC: Beta8 compiler error

Beta8 compiler error 2 months 3 weeks ago #1

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
Attachments:

Please Log in or Create an account to join the conversation.

Beta8 compiler error 2 months 3 weeks ago #2

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
XSharp Development Team
The Netherlands
This email address is being protected from spambots. You need JavaScript enabled to view it.

Please Log in or Create an account to join the conversation.

Beta8 compiler error 2 months 3 weeks ago #3

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

Please Log in or Create an account to join the conversation.

Beta8 compiler error 2 months 3 weeks ago #4

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

Please Log in or Create an account to join the conversation.

Beta8 compiler error 2 months 3 weeks ago #5

George,
I don't have .Net Reactor.
Where can I download a version ?

Robert
XSharp Development Team
The Netherlands
This email address is being protected from spambots. You need JavaScript enabled to view it.

Please Log in or Create an account to join the conversation.

Beta8 compiler error 2 months 3 weeks ago #6

Robert,

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
Attachments:

Please Log in or Create an account to join the conversation.

Beta8 compiler error 2 months 3 weeks ago #7

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 ?

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

Please Log in or Create an account to join the conversation.

Beta8 compiler error 2 months 3 weeks ago #8

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
XSharp Development Team
The Netherlands
This email address is being protected from spambots. You need JavaScript enabled to view it.

Please Log in or Create an account to join the conversation.

Beta8 compiler error 2 months 3 weeks ago #9

Aaaaaaargh ...

got it.

thanks !

Please Log in or Create an account to join the conversation.

Beta8 compiler error 2 months 2 weeks ago #10

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

Please Log in or Create an account to join the conversation.

  • Page:
  • 1