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 27 Dec 2018 08:55 #7030

  • hsc's Avatar

  • hsc

  • Topic Author


  • Posts: 126
  • 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 27 Dec 2018 09:47 #7031

  • robert's Avatar

  • robert


  • Posts: 1793
  • 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

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

    Beta8 compiler error 27 Dec 2018 10:12 #7032

  • hsc's Avatar

  • hsc

  • Topic Author


  • Posts: 126
  • 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 27 Dec 2018 13:21 #7033

  • George's Avatar

  • George


  • Posts: 94
  • 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 27 Dec 2018 13:33 #7034

  • robert's Avatar

  • robert


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

    Robert
    XSharp Development Team
    The Netherlands

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

    Beta8 compiler error 27 Dec 2018 13:40 #7035

  • George's Avatar

  • George


  • Posts: 94
  • 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 28 Dec 2018 10:30 #7036

  • Karl-Heinz's Avatar

  • Karl-Heinz


  • Posts: 585
  • 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 28 Dec 2018 10:44 #7037

  • robert's Avatar

  • robert


  • Posts: 1793
  • 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

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

    Beta8 compiler error 28 Dec 2018 12:13 #7038

  • Karl-Heinz's Avatar

  • Karl-Heinz


  • Posts: 585
  • Aaaaaaargh ...

    got it.

    thanks !

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

    Beta8 compiler error 07 Jan 2019 13:43 #7107

  • George's Avatar

  • George


  • Posts: 94
  • 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