Haxe Forum > Installing C# target?

  • Hi I have installed the latest Nightly build from here:
    http://haxe.cmt.tc/windows/
    (haxe_r4735.zip 02-Jun-2012 11:44 1.9M)
    - I have followed the instructions( copied over the std dir and the haxe.exe).
    - the std directory does have a 'cs' directory, which I suppose refers to C#.

    - however I am not sure what to do next? If i start FlashDevelop, C# is NOT listed as a Target.

    Any ideas?

    Martin

  • If you have questions about FlashDevelop it might be best to ask them on their forum:
    http://www.flashdevelop.org/community/index.php

    Jan

  • Hi Jan

    Thanks for the quick reply.

    So lets just confirm, the latest nightly build DOES have the C# target, and it SHOULD work, so this error is simply a Flashdevelop error right?

  • Haxe does have a C# target. but I am unsure how usable it currently is. so unless your really able, and willing to get your hands dirty I would suggest waiting a bit longer. FlashDevelop will not be setup for c# target compile, I would suggest trying something simpler like http://www.sublimetext.com/2, where you can construct your own hxml, ( you can do this with FlashDevelop but simpler to try with a simple text editor ).

  • Thanks for the response Justin!
    I am only looking to export some mostly abstract/math based classes nothing fancy(these arent complete projects), so if the basics work that should be fine.

    However I would appreciate if you could provide a bit more detailed help about how to set up the compiler/project so that I can compile into a C# .dll.

    Martin

  • Hi!

    I don't use Flashdevelop (I'm a GNU/Linux user), but this is the setup for compile C# source code:

    # From command line
    haxe -cs <target directory> -main <main class>
    # Or in a hxml, putting the -cs flag

    If you want to compile the C# source code, using Mono Compiler:

    cd <target directory>/src
    gmcs -recurse:*.cs -main:<main class> -out:<desired exec name>

    Hope this help you.

  • Martin

    I have added a tutorial page to the wiki. Max I hope you don't mind, basically I used the information you provided, after testing with textmate on my mac after creating a lion nightly (rev 4747).

    docs c#

    Max it would be useful if you can explain the compile line a bit more, I was not fully clear on it. I seem to be getting some runtime warnings after hello traces, I will post them here for reference.

    ./Array.cs(44,40): warning CS0108: `Array.__hx_class' hides inherited member `haxe.lang.HxObject.__hx_class'. Use the new keyword if hiding was intended ./haxe/lang/HxObject.cs(51,48): (Location of the symbol related to previous warning) ./Array.cs(46,41): warning CS0108: `Array.__hx_getClassStatic()' hides inherited member `haxe.lang.HxObject.__hx_getClassStatic()'. Use the new keyword if hiding was intended ./haxe/lang/HxObject.cs(53,49): (Location of the symbol related to previous warning) ./Hash.cs(22,40): warning CS0108: `Hash.__hx_class' hides inherited member `haxe.lang.HxObject.__hx_class'. Use the new keyword if hiding was intended ./haxe/lang/HxObject.cs(51,48): (Location of the symbol related to previous warning) ./Hash.cs(24,41): warning CS0108: `Hash.__hx_getClassStatic()' hides inherited member `haxe.lang.HxObject.__hx_getClassStatic()'. Use the new keyword if hiding was intended ./haxe/lang/HxObject.cs(53,49): (Location of the symbol related to previous warning) ./IntIter.cs(22,40): warning CS0108: `IntIter.__hx_class' hides inherited member `haxe.lang.HxObject.__hx_class'. Use the new keyword if hiding was intended ./haxe/lang/HxObject.cs(51,48): (Location of the symbol related to previous warning) ./IntIter.cs(24,41): warning CS0108: `IntIter.__hx_getClassStatic()' hides inherited member `haxe.lang.HxObject.__hx_getClassStatic()'. Use the new keyword if hiding was intended ./haxe/lang/HxObject.cs(53,49): (Location of the symbol related to previous warning) ./Reflect.cs(196,40): warning CS0108: `Reflect.__hx_class' hides inherited member `haxe.lang.HxObject.__hx_class'. Use the new keyword if hiding was intended ./haxe/lang/HxObject.cs(51,48): (Location of the symbol related to previous warning) ./Reflect.cs(198,41): warning CS0108: `Reflect.__hx_getClassStatic()' hides inherited member `haxe.lang.HxObject.__hx_getClassStatic()'. Use the new keyword if hiding was intended ./haxe/lang/HxObject.cs(53,49): (Location of the symbol related to previous warning) ./StringBuf.cs(21,40): warning CS0108: `StringBuf.__hx_class' hides inherited member `haxe.lang.HxObject.__hx_class'. Use the new keyword if hiding was intended ./haxe/lang/HxObject.cs(51,48): (Location of the symbol related to previous warning) ./StringBuf.cs(23,41): warning CS0108: `StringBuf.__hx_getClassStatic()' hides inherited member `haxe.lang.HxObject.__hx_getClassStatic()'. Use the new keyword if hiding was intended ./haxe/lang/HxObject.cs(53,49): (Location of the symbol related to previous warning) ./StringTools.cs(221,40): warning CS0108: `StringTools.__hx_class' hides inherited member `haxe.lang.HxObject.__hx_class'. Use the new keyword if hiding was intended ./haxe/lang/HxObject.cs(51,48): (Location of the symbol related to previous warning) ./StringTools.cs(223,41): warning CS0108: `StringTools.__hx_getClassStatic()' hides inherited member `haxe.lang.HxObject.__hx_getClassStatic()'. Use the new keyword if hiding was intended ./haxe/lang/HxObject.cs(53,49): (Location of the symbol related to previous warning) ./Test.cs(24,40): warning CS0108: `Test.__hx_class' hides inherited member `haxe.lang.HxObject.__hx_class'. Use the new keyword if hiding was intended ./haxe/lang/HxObject.cs(51,48): (Location of the symbol related to previous warning) ./Test.cs(26,41): warning CS0108: `Test.__hx_getClassStatic()' hides inherited member `haxe.lang.HxObject.__hx_getClassStatic()'. Use the new keyword if hiding was intended ./haxe/lang/HxObject.cs(53,49): (Location of the symbol related to previous warning) ./haxe/lang/HxObject.cs(1123,48): warning CS0108: `haxe.lang.Enum.__hx_class' hides inherited member `haxe.lang.HxObject.__hx_class'. Use the new keyword if hiding was intended ./haxe/lang/HxObject.cs(51,48): (Location of the symbol related to previous warning) ./haxe/lang/HxObject.cs(1125,49): warning CS0108: `haxe.lang.Enum.__hx_getClassStatic()' hides inherited member `haxe.lang.HxObject.__hx_getClassStatic()'. Use the new keyword if hiding was intended ./haxe/lang/HxObject.cs(53,49): (Location of the symbol related to previous warning) ./Type.cs(66,40): warning CS0108: `ValueType.__hx_class' hides inherited member `haxe.lang.Enum.__hx_class'. Use the new keyword if hiding was intended ./haxe/lang/HxObject.cs(1123,48): (Location of the symbol related to previous warning) ./Type.cs(68,41): warning CS0108: `ValueType.__hx_getClassStatic()' hides inherited member `haxe.lang.Enum.__hx_getClassStatic()'. Use the new keyword if hiding was intended ./haxe/lang/HxObject.cs(1125,49): (Location of the symbol related to previous warning) ./Type.cs(570,40): warning CS0108: `Type.__hx_class' hides inherited member `haxe.lang.HxObject.__hx_class'. Use the new keyword if hiding was intended ./haxe/lang/HxObject.cs(51,48): (Location of the symbol related to previous warning) ./Type.cs(572,41): warning CS0108: `Type.__hx_getClassStatic()' hides inherited member `haxe.lang.HxObject.__hx_getClassStatic()'. Use the new keyword if hiding was intended ./haxe/lang/HxObject.cs(53,49): (Location of the symbol related to previous warning) ./cs/Boot.cs(13,48): warning CS0108: `cs.Boot.__hx_class' hides inherited member `haxe.lang.HxObject.__hx_class'. Use the new keyword if hiding was intended ./haxe/lang/HxObject.cs(51,48): (Location of the symbol related to previous warning) ./cs/Boot.cs(15,49): warning CS0108: `cs.Boot.__hx_getClassStatic()' hides inherited member `haxe.lang.HxObject.__hx_getClassStatic()'. Use the new keyword if hiding was intended ./haxe/lang/HxObject.cs(53,49): (Location of the symbol related to previous warning) ./cs/Lib.cs(62,48): warning CS0108: `cs.Lib.__hx_class' hides inherited member `haxe.lang.HxObject.__hx_class'. Use the new keyword if hiding was intended ./haxe/lang/HxObject.cs(51,48): (Location of the symbol related to previous warning) ./cs/Lib.cs(64,49): warning CS0108: `cs.Lib.__hx_getClassStatic()' hides inherited member `haxe.lang.HxObject.__hx_getClassStatic()'. Use the new keyword if hiding was intended ./haxe/lang/HxObject.cs(53,49): (Location of the symbol related to previous warning) ./haxe/Log.cs(22,48): warning CS0108: `haxe.Log.__hx_class' hides inherited member `haxe.lang.HxObject.__hx_class'. Use the new keyword if hiding was intended ./haxe/lang/HxObject.cs(51,48): (Location of the symbol related to previous warning) ./haxe/Log.cs(24,49): warning CS0108: `haxe.Log.__hx_getClassStatic()' hides inherited member `haxe.lang.HxObject.__hx_getClassStatic()'. Use the new keyword if hiding was intended ./haxe/lang/HxObject.cs(53,49): (Location of the symbol related to previous warning) ./haxe/lang/FieldLookup.cs(173,48): warning CS0108: `haxe.lang.FieldLookup.__hx_class' hides inherited member `haxe.lang.HxObject.__hx_class'. Use the new keyword if hiding was intended ./haxe/lang/HxObject.cs(51,48): (Location of the symbol related to previous warning) ./haxe/lang/FieldLookup.cs(175,49): warning CS0108: `haxe.lang.FieldLookup.__hx_getClassStatic()' hides inherited member `haxe.lang.HxObject.__hx_getClassStatic()'. Use the new keyword if hiding was intended ./haxe/lang/HxObject.cs(53,49): (Location of the symbol related to previous warning) ./haxe/lang/HxObject.cs(383,48): warning CS0108: `haxe.lang.DynamicObject.__hx_class' hides inherited member `haxe.lang.HxObject.__hx_class'. Use the new keyword if hiding was intended ./haxe/lang/HxObject.cs(51,48): (Location of the symbol related to previous warning) ./haxe/lang/HxObject.cs(385,49): warning CS0108: `haxe.lang.DynamicObject.__hx_getClassStatic()' hides inherited member `haxe.lang.HxObject.__hx_getClassStatic()'. Use the new keyword if hiding was intended ./haxe/lang/HxObject.cs(53,49): (Location of the symbol related to previous warning) ./haxe/lang/HxObject.cs(663,49): warning CS0108: `haxe.lang.Class.__hx_getClassStatic()' hides inherited member `haxe.lang.HxObject.__hx_getClassStatic()'. Use the new keyword if hiding was intended ./haxe/lang/HxObject.cs(53,49): (Location of the symbol related to previous warning)
    Compilation succeeded - 37 warning(s)
    Test.hx:3: Hello World !
    ./haxe/lang/HxObject.cs(824,40): warning CS0108: `haxe.lang.NativeClassWrapper.__hx_getClassStatic()' hides inherited member `haxe.lang.Class.__hx_getClassStatic()'. Use the new keyword if hiding was intended ./haxe/lang/HxObject.cs(663,49): (Location of the symbol related to previous warning) ./haxe/lang/StringExt.cs(162,48): warning CS0108: `haxe.lang.StringRefl.__hx_class' hides inherited member `haxe.lang.HxObject.__hx_class'. Use the new keyword if hiding was intended ./haxe/lang/HxObject.cs(51,48): (Location of the symbol related to previous warning) ./haxe/lang/StringExt.cs(164,49): warning CS0108: `haxe.lang.StringRefl.__hx_getClassStatic()' hides inherited member `haxe.lang.HxObject.__hx_getClassStatic()'. Use the new keyword if hiding was intended ./haxe/lang/HxObject.cs(53,49): (Location of the symbol related to previous warning) ./Type.cs(27,32): warning CS0219: The variable `__temp_expr23' is assigned but its value is never used ./haxe/Int64.cs(9,78): warning CS0675: The operator `|' used on the sign-extended type `int'. Consider casting to a smaller unsigned type first ./haxe/lang/HxObject.cs(378,40): warning CS0219: The variable `__temp_expr25' is assigned but its value is never used

    Jan or Max feel free to improve the page, I basically went with the code I was using so it differs very slightly to the Java one but is based on the same structure, but not bothered with a bin folder maybe I should have.

< Prev | Page 1 / 1 | Next >