Welcome, Guest
Username: Password: Remember me
Please use this forum for suggestions to the XSharp Development Team
  • Page:
  • 1
  • 2

TOPIC:

Possibly error message when starting program with missing included DLL 20 Mar 2020 09:46 #13799

  • ArneOrtlinghaus
  • ArneOrtlinghaus's Avatar
  • Topic Author


  • Posts: 339
  • Robert,
    thank you for the information. Nice to know how much the compiler does. In older times every type had to be exact what was requested in the original function and now the compiler makes all the transformations/castings that are necessary.

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

    Possibly error message when starting program with missing included DLL 20 Mar 2020 13:01 #13801

    • robert
    • robert's Avatar


  • Posts: 3448
  • Arne,

    ArneOrtlinghaus wrote: Robert,
    thank you for the information. Nice to know how much the compiler does. In older times every type had to be exact what was requested in the original function and now the compiler makes all the transformations/castings that are necessary.


    Although I really would want to take the credit for this, that would be too much honour.
    All this stuff is done by the guys at Microsoft.

    Robert
    XSharp Development Team
    The Netherlands

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

    Possibly error message when starting program with missing included DLL 20 Mar 2020 16:06 #13806

    • wriedmann
    • wriedmann's Avatar


  • Posts: 3298
  • Hi Robert,

    I have tried this, but it does not even compiles:
    error XS0234: The type or namespace name 'exe' does not exist in the namespace 'ProdPlan' (are you missing an assembly reference?)	15,2	Start.prg	ProdPlan
    My Application is called ProdPlan.exe, and uses the namespace ProdPlan.
    I have now tried to do that in a small sample, but have the same behavior:

    File Attachment:

    File Name: StartupExc...ster.zip
    File Size:2 KB

    The code is the following:
    try
    
    ProdPlan.exe.Functions.Start()
    
    catch oEx as Exception
    .....
    Where is my error, please?
    Thank you very much!
    Wolfgang
    Wolfgang Riedmann
    Meran, South Tyrol, Italy

    www.riedmann.it - docs.xsharp.it

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

    Last edit: by wriedmann.

    Possibly error message when starting program with missing included DLL 20 Mar 2020 16:20 #13808

    • robert
    • robert's Avatar


  • Posts: 3448
  • Wolfgang,

    This app is for the Core dialect. The namespace rules are different in the core dialect. The class is now simply named "Functions".

    So you need to call Functions.Start()

    But since you have an argument in Start() for the commandline arguments, you also need this argument in the Start() method and you need to pass that argument along.

    And then, after you fix the missing parameters in your call to OutPut() <g> everything will work.

    Robert
    XSharp Development Team
    The Netherlands

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

    Possibly error message when starting program with missing included DLL 20 Mar 2020 16:21 #13809

    • wriedmann
    • wriedmann's Avatar


  • Posts: 3298
  • Hi Robert,
    it works now with this code:
    Functions.Start()
    For anyone interested please see the attached sample:

    File Attachment:

    File Name: StartupExc...ster.zip
    File Size:2 KB

    I have tried to inherit the startup window from a class in an external DLL and the copied the exe without the DLL to a random folder, and effectively I can see the correct error (and it is written to the disk).
    Wolfgang
    Wolfgang Riedmann
    Meran, South Tyrol, Italy

    www.riedmann.it - docs.xsharp.it

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

    Possibly error message when starting program with missing included DLL 20 Mar 2020 16:23 #13810

    • wriedmann
    • wriedmann's Avatar


  • Posts: 3298
  • Hi Robert,

    yes, after fixing the error with the Start() call I have seen (and fixed) also the errors in my Output call.
    It works now:
    An unhandled exception has occurred
    ===================================
    Exception: Die Datei oder Assembly "rdm.WinFormsLib, Version=1.0.0.1, Culture=neutral, PublicKeyToken=37b41ccb897b15ad" oder eine Abhängigkeit davon wurde nicht gefunden. Das System kann die angegebene Datei nicht finden.
    Callstack:
       bei Functions.Start()
       bei XStartupCode.Start() in C:\XSharp\XIDE\Projects\PublicProjects\Applications\StartupExceptionTester\Prg\Start.prg:Zeile 18.
    
    ===================================
    Press any to close the application

    Thank you very much!

    Wolfgang
    Wolfgang Riedmann
    Meran, South Tyrol, Italy

    www.riedmann.it - docs.xsharp.it

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

    Possibly error message when starting program with missing included DLL 20 Mar 2020 16:35 #13811

    • wriedmann
    • wriedmann's Avatar


  • Posts: 3298
  • Hi Robert,
    another thing: I have now implemented that in my production planning software, and on compile I receive the following warning:
    warning XS0436: The type 'Functions' in '' conflicts with the imported type 'Functions' in 'ProdPlanGUILib, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null'. Using the type defined in ''.	15,2	Start.prg	ProdPlan
    This application uses another lib that uses the same namespace.
    Is the only solution to change the namespace of the library?
    Thank you very much!
    Wolfgang
    Wolfgang Riedmann
    Meran, South Tyrol, Italy

    www.riedmann.it - docs.xsharp.it

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

    Possibly error message when starting program with missing included DLL 20 Mar 2020 16:49 #13812

    • wriedmann
    • wriedmann's Avatar


  • Posts: 3298
  • Hi Robert,
    another thing: when using a namespace, the compiler option must include it:
    -main:ProdPlan.XStartupCode
    Wolfgang
    P.S. maybe I will include that and a link to this discussion on the wiki....
    Wolfgang Riedmann
    Meran, South Tyrol, Italy

    www.riedmann.it - docs.xsharp.it

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

    • Page:
    • 1
    • 2