[Mono-list] Conditional Compile under Mono

Willem J.W. Semmelink willems@digicore.co.za
Mon, 31 May 2004 10:51:21 +0200


Hi everyone

I tried to port the code below from Win XP to Red Hat 9.0.=20
The code compiled with .NET and MONO under XP, but in Linux I got an =
error that dllimport is not defined. My problem is that I used the =
conditional compile USEGTK, so the compiler should not complain about =
dllimport. Does anyone know why?

#if (USEGTK)
  //....
#elif (USESWF)
  [DllImport("gdi32.dll")]
  static private extern bool GetTextMetrics(IntPtr hDC, out TextMetric =
TM);
#endif

Software versions:
Mono:		Beta (from distributed binaries)
Gtk-sharp:	0.18(Windows) =20
		(Linux) gtk-sharp-0.91.1-0.ximian.6.0.i386.rpm
Thanks
Willem Semmelink