Results 1 to 8 of 8

Thread: Mono, GTK# and Oxygene Command Line

  1. #1

    Mono, GTK# and Oxygene Command Line

    Hi there, new PGD looks great!

    I'm trying to get started with Oxygene. However, I don't like .NET so I installed Mono framework. There is wrote something about compiling for Mono. And everything works fine with {MONOFRAMEWORK}. But, I need GTK# so I want replace {MONOFRAMEWORK} to {MONO} to get this. And... The compiler starts crying:
    Code:
    Unable to load assembly C:\(...)\mscorlib.dll
    So, the question is: how to use GTK# with Mono and Oxygene? Delphi Prism wiki is wrong...?





    And theres a bonus question! List, stack and queues are in the same unit, I am right? So, why I can't use stacks and queues?
    [pascal]
    var lista := new list <integer>; //OK
    var stos := new stack <integer>; //ERROR
    var kolejka := new queue <integer>; //ERROR
    [/pascal]


    Thanks for help.

  2. #2

    Re: Mono, GTK# and Oxygene Command Line

    What is the difference between {MONOFRAMEWORK} and {MONO} ? Arent they the same?
    Also changing the framework with ms works like this:

    Oxygene MyForm.pas /assemblyname:MyForm /type:winexe /frameworkfolder:C:\WINDOWS\Microsoft.NET\FrameWork \v2.0.50727 /ref:$(Framework)\System.Windows.Forms.dll /ref:$(Framework)\System.Drawing.dll /ref:$(FrameWork)\System.dll

    So with /frameworkfolder you tell the compiler what framework you want to use. Next /ref:$(FrameWork)\System.dll uses that path.
    http://3das.noeska.com - create adventure games without programming

  3. #3

    Re: Mono, GTK# and Oxygene Command Line

    Yep, I know about -frameworkfolder. I'm typing something like this:
    Code:
    oxygene -frameworkfolder:{MONOFRAMEWORK} a.pas
    What's the diffrenece between {MONOFRAMEWORK} and {MONO}? Delphi Prism Wiki says that with {MONOFRAMEWORK} I can use only Mono, with {MONO} I can use GTK# and other units.

  4. #4

    Re: Mono, GTK# and Oxygene Command Line

    This should exaplain it: http://prismwiki.codegear.com/en/Compiling_for_Mono
    so {MONO}\2.0\ should be equal to {MONOFRAMEWORK} so i think you should include \2.0\ to some of your references.
    Also you may need to use mono oxygene instead of oxygene if you also have the microsoft .net installed.
    http://3das.noeska.com - create adventure games without programming

  5. #5

    Re: Mono, GTK# and Oxygene Command Line

    Ha, thanks for help! I'm new in "command line compiling" so, I just put "oxygene -frameworkfolder:{MONO}" and I was thinking that it will add all *.dll's in all subfolders! When I added "-ref:{MON}\gtk(...)" with all needed *.dll's everything works fine

    However, question about stack and queues is still alive

  6. #6

    Re: Mono, GTK# and Oxygene Command Line

    Loose the new keyword? The source you posted looks like vb to me? Try to find some c# source and translate that with babelcode ( http://lingua.codegear.com/babelcode...belClient.aspx ). You cannot trust it always but 90% it provides correct delphi code.
    http://3das.noeska.com - create adventure games without programming

  7. #7

    Re: Mono, GTK# and Oxygene Command Line

    I'm declaring it correctly - I'm sure 'bout that. Look at Wikipedia examples:
    http://en.wikipedia.org/wiki/Oxygene_(programming_language)

    Now look here:http://msdn.microsoft.com/en-us/libr...s.generic.aspx
    List, stack and queue are in the same unit. The declaration of it is the same too (the diffrence is in name of course). If this
    [pascal]
    var l := new list <integer>;
    [/pascal]
    compile fine, why this cannot?:
    [pascal]
    var l := new stack {or queue} <integer>;
    [/pascal]

  8. #8

    Re: Mono, GTK# and Oxygene Command Line

    Hi again. To include all of the GTK# libaries in C# compiler, I simply put that to compile:
    Code:
    mcs -pkg:gtk-sharp-2.0 name.cs
    To include the same libaries in Oxygene I have to write this horrible command:
    Code:
    oxygene -frameworkfolder:{MONOFRAMEWORK} -ref:{MONO}\gtk-sharp-2.0\gtk-sharp.dll -ref:{MONO}\gtk-sharp-2.0\glib-sharp.dll name.pas
    And that's for only basic GTK# options. Is there anyway to cut some characters from it? If not - it suck...

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •