Export to GitHub

alsing - issue #3

Issues for compiling under Mono


Posted on Jul 30, 2008 by Swift Ox

I'm trying to start small, with one component at a time. I'm starting in the SyntaxBox/Alsing.SyntaxBox/Document and have a makefile that works with Mono's compiler, gmcs, verion 1.9.1.

1) The first issue I encountered was the lines "Text = Text;" I'm not sure what the meaning of those lines is, but for whatever reason, this puts the mono runtime into an infinite loop. I've commented those lines out. That makes with:

gmcs -recurse:*.cs -unsafe \ -r:System.Windows.Forms.dll -r:System.Drawing.dll \ -target:library -out:Document.dll

Safe was required because: ./Parser/ParseTools.cs(25,35): error CS0227: Unsafe code requires the `unsafe' command line option to be specified

2) Next, working on SyntaxBox/Samples/HelloWorld/ but I didn't want to build SyntaxBox controller yet. Is there is a way to not use the controller?

-Doug

Comment #1

Posted on Jul 31, 2008 by Swift Ox

I see what the Text = Text is supposed to do, and attempting to track down this infinite loop. I've added a Main to SyntaxBox/Alsing.SyntaxBox/Document/SyntaxDocument.cs:

public static void Main(string [] args) { SyntaxDocument sd = new SyntaxDocument(); sd.SyntaxFile = "Python.syn"; sd.Text = "x = 7"; }

and get a loop. Is that proper usage? I've copied Python.syn to the local dir. Looks like ParseQueue.Count is always 1.

Comment #2

Posted on Sep 7, 2008 by Swift Ox

I made some progress compiling under Mono 1.9.1 and Mono 2.0. But, there appears to be a bug in the GDI that prevent it from working (stack dump below). Things that need to be adjusted:

1) In Resourses.resx, filenames cases don't match. Linux is case sensitive, so I had to change those. See make file for making Resources.resources.

2) Some hardcoded paths (in HelloWorld for example)

I also attached SyntaxBox/Alsing.SyntaxBox/Makefile and SyntaxBox/Samples/HelloWorld/Makefile in case anyone wants to pick this up from here.

MONO_PATH=../../Alsing.SyntaxBox mono Program.exe

Unhandled Exception: System.EntryPointNotFoundException: GetDC at (wrapper managed-to-native) Alsing.Windows.NativeMethods:GetDC (intptr) at Alsing.Windows.NativeMethods.ControlDC (System.Windows.Forms.Control control) [0x00000] at Alsing.Drawing.GDI.GDISurface..ctor (Int32 width, Int32 height, System.Windows.Forms.Control CompatibleControl, Boolean BindControl) [0x00000] at Alsing.Windows.Forms.SyntaxBox.Painter.NativePainter.InitGraphics () [0x00000] at Alsing.Windows.Forms.SyntaxBox.Painter.NativePainter..ctor (Alsing.Windows.Forms.SyntaxBox.EditViewControl control) [0x00000] at Alsing.Windows.Forms.SyntaxBox.EditViewControl..ctor (Alsing.Windows.Forms.SyntaxBoxControl Parent) [0x00000] at (wrapper remoting-invoke-with-check) Alsing.Windows.Forms.SyntaxBox.EditViewControl:.ctor (Alsing.Windows.Forms.SyntaxBoxControl) at Alsing.Windows.Forms.SyntaxBoxControl.GetNewView () [0x00000] at Alsing.Windows.Forms.CoreLib.SplitViewParentControl..ctor () [0x00000] at Alsing.Windows.Forms.SyntaxBoxControl..ctor () [0x00000] at (wrapper remoting-invoke-with-check) Alsing.Windows.Forms.SyntaxBoxControl:.ctor () at HelloWorld.Form1.InitializeComponent () [0x00000] at HelloWorld.Form1..ctor () [0x00000] at (wrapper remoting-invoke-with-check) HelloWorld.Form1:.ctor () at HelloWorld.Program.Main () [0x00000] make: * [run] Error 1

Attachments

Comment #3

Posted on Apr 27, 2010 by Swift Ox

SyntaxBox now builds directly with Mono 2.7's xbuild, with the attached diff applied, with "xbuild Alsing.SyntaxBox.sln". The patch fixes the cases of filenames for those systems whose filesystem pays attention to case.

But, doesn't run with the same error as above.

Attachments

Status: New

Labels:
Type-Defect Priority-Medium