[Mono-winforms-list] WinForms not working on Solaris 10 x86

joshua70448 jfoster at capsher.com
Wed Jun 4 17:37:41 EDT 2008


I've gotten Mono version 104528 built on a Solaris 10 x86 machine, and it can
compile and run ordinary C# programs with ease.  However, any time I invoke
a WinForms class, it looks like the form isn't appearing; the trace only
shows a keyboard loop, and the program never completes.  Here's the program
I'm trying to run:

using System;
using System.Windows.Forms;

namespace HelloApp
{
	public class HelloWorld
	{
		[STAThread]
		static void Main()
		{
			Console.WriteLine("Start");
			MessageBox.Show("Test message");
			Console.WriteLine("End");
		}
	}
}

When this program executes, the only thing that appears is "Start" on the
console, and the program never exits.  Might I have missed something while
compiling?  Here's the procedure I followed when compiling Mono:

1. Make sure you have GCC installed (this procedure has been tested with
GCC3)
2. Make sure your PATH variable has the following directories:
      PATH = /opt/csw/bin:/opt/csw/sbin:/usr/bin:/bin:
/usr/ucb:/usr/sfw/bin:/usr/ccs/bin:/usr/sbin:/sbin:/usr/local/bin
3. Set your PKG_CONFIG_PATH variable to include your home directory:
      PKG_CONFIG_PATH = /home/username:$PKG_CONFIG_PATH
4. Set your CC variable to point at your installation of GCC:
      CC = /path/to/gcc
5. Set your CFLAGS variable to:
      CFLAGS = '-D_POSIX_PTHREAD_SEMANTICS'
6. Copy the following files to your home directory:
      /usr/lib/pkgconfig/gthread-2.0.pc
      /usr/lib/pkgconfig/glib-2.0.pc
7. Edit /home/username/gthread-2.0.pc and replace all occurrences of -mt to
-D_REENTRANT
8. Download the mono and libgdiplus source from
http://mono.ximian.com/monobuild/snapshot/sources-trunk/
      Under the Mono category, select the mono-######.tar.bz2 and
libgdiplus-######.tar.bz2 files (where ###### are the build numbers)
9. Extract the BZ2 files you downloaded into the directory of your choice
10. Path into the mono-###### directory you chose in the previous step
11. Run the configure script:
      ./configure --with-libs=/opt/csw/lib --with-includes=/opt/csw/include
12. Run the build script:
      gmake
NOTE: If you encounter the following error message while building:
        "cc1: error: invalid option 't'"
      then a problem is occurring with your PKG_CONFIG_PATH variable.  In
C-compatible shells, this
      can be fixed by adding the following to the front of the commands in
steps 11 through 13:
        env PKG_CONFIG_PATH=/home/username
      Perform steps 11 and 12 again using this fix if you have option 't'
problems, and use this
      fix on step 13 to complete the install.
13. Run the install script:
      gmake install
    Note that this step must be run as a superuser.
14. Perform steps 10-13 for the libgdiplus-###### directory.
15. Execute the following command to add gdiplus to the dynamic linker:
      crle -l /usr/local/lib -u
    Note that this step must be run as a superuser.

Thanks in advance!
Joshua Foster

-- 
View this message in context: http://www.nabble.com/WinForms-not-working-on-Solaris-10-x86-tp17657253p17657253.html
Sent from the Mono - WinForms mailing list archive at Nabble.com.



More information about the Mono-winforms-list mailing list