Compilation issues with Mono

View: New views
4 Messages — Rating Filter:   Alert me  

Compilation issues with Mono

by Erik Karlsson :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi,

I just starting to use Tao so I'm sorry if I'm asking question that is
well known.

I just checked out a copy from the SVN and started to build the
different parts of the Tao framework. However, I encountered an issues
when trying to compile the Tao.OpenGL.dll.

I was using the guidelines defines in the README.autotools. My
environment is mono + ubuntu 7.10 (x86).

When compiling the Tao.OpenGL I got the following errors:

./Glx.cs(923,50): error CS0626:
`Tao.Platform.X11.Glx.glXQueryExtension(System.IntPtr, int*, int*)' is
marked as an external but has no DllImport attribute. Consider adding
a DllImport attribute to specify the external implementation
./Glx.cs(991,50): error CS0626:
`Tao.Platform.X11.Glx.glXQueryVersion(System.IntPtr, int*, int*)' is
marked as an external but has no DllImport attribute. Consider adding
a DllImport attribute to specify the external implementation
./Glx.cs(1312,43): error CS0626:
`Tao.Platform.X11.Glx.glXQueryDrawable(System.IntPtr, System.IntPtr,
int, uint[])' is marked as an external but has no DllImport attribute.
Consider adding a DllImport attribute to specify the external
implementation
./Glx.cs(1418,42): error CS0626:
`Tao.Platform.X11.Glx.glXGetSelectedEvent(System.IntPtr,
System.IntPtr, ulong)' is marked as an external but has no DllImport
attribute. Consider adding a DllImport attribute to specify the
external implementation
Compilation failed: 4 error(s), 0 warnings
make[1]: *** [bin/Debug/Tao.Platform.X11.dll] Error 1
make[1]: Leaving directory
`/home/ekarlsso/downloads/tao/src/Tao.OpenGl/autotools/Tao.OpenGl/Tao.Platform.X1

Are these some well known issue or just a random situation in the trunk?

br,
- Erik

--
Erik Karlsson
erik.karlsson@...
_______________________________________________
Tao-list mailing list
Tao-list@...
http://galactus.ximian.com/mailman/listinfo/tao-list

Re: [patch] Compilation issues with Mono

by Sam Hocevar :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Thu, Nov 01, 2007, Erik Karlsson wrote:

> ./Glx.cs(1418,42): error CS0626:
> `Tao.Platform.X11.Glx.glXGetSelectedEvent(System.IntPtr,
> System.IntPtr, ulong)' is marked as an external but has no DllImport
> attribute. Consider adding a DllImport attribute to specify the
> external implementation
> Compilation failed: 4 error(s), 0 warnings
> make[1]: *** [bin/Debug/Tao.Platform.X11.dll] Error 1
> make[1]: Leaving directory
> `/home/ekarlsso/downloads/tao/src/Tao.OpenGl/autotools/Tao.OpenGl/Tao.Platform.X1
>
> Are these some well known issue or just a random situation in the trunk?
   Tao.Platform.X11 was checked in very recently so it's probably not
well known. You may try the attached patch.

Regards,
--
Sam.


Index: tao-2.0.0.svn20071026/Tao.OpenGl/Tao.Platform.X11/Glx.cs
===================================================================
--- tao-2.0.0.svn20071026.orig/Tao.OpenGl/Tao.Platform.X11/Glx.cs 2007-10-27 09:36:48.000000000 +0000
+++ tao-2.0.0.svn20071026/Tao.OpenGl/Tao.Platform.X11/Glx.cs 2007-10-27 09:36:52.000000000 +0000
@@ -920,6 +920,7 @@
         /// <param name="eventBase"></param>
         /// <returns></returns>
         [CLSCompliant(false)]
+ [DllImport( LIBGL, CallingConvention = CALLING_CONVENTION, EntryPoint = "glXQueryExtension" ), SuppressUnmanagedCodeSecurity]
  public static unsafe extern bool glXQueryExtension( IntPtr dpy, int* errorBase, int* eventBase );
 
         /// <summary>
@@ -988,6 +989,7 @@
         /// <param name="minor"></param>
         /// <returns></returns>
         [CLSCompliant(false)]
+ [DllImport( LIBGL, CallingConvention = CALLING_CONVENTION, EntryPoint = "glXQueryVersion" ), SuppressUnmanagedCodeSecurity]
  public static unsafe extern bool glXQueryVersion( IntPtr dpy, int* major, int* minor );
  //public static unsafe extern bool glXQueryVersion( IntPtr dpy, out int major, out int minor )
  //{
@@ -1309,6 +1311,7 @@
         /// <param name="attribute"></param>
         /// <param name="value"></param>
         [CLSCompliant(false)]
+ [DllImport( LIBGL, CallingConvention = CALLING_CONVENTION, EntryPoint = "glXQueryDrawable" ), SuppressUnmanagedCodeSecurity]
  public static extern void glXQueryDrawable( IntPtr dpy, IntPtr draw, int attribute, uint[] value );
 
  /// <summary>
@@ -1415,6 +1418,7 @@
         /// <param name="draw"></param>
         /// <param name="event_mask"></param>
         [CLSCompliant(false)]
+        [DllImport( LIBGL, CallingConvention = CALLING_CONVENTION, EntryPoint = "glXGetSelectedEvent" ), SuppressUnmanagedCodeSecurity]
         public static unsafe extern void glXGetSelectedEvent( IntPtr dpy, IntPtr draw, ulong event_mask );
 
  /* GLX 1.4 and later */


_______________________________________________
Tao-list mailing list
Tao-list@...
http://galactus.ximian.com/mailman/listinfo/tao-list

Re: [patch] Compilation issues with Mono

by Erik Karlsson :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

>    Tao.Platform.X11 was checked in very recently so it's probably not
> well known. You may try the attached patch.

Thanks. Patches worked fine. Was now able to compile the code.

BR,
- Erik


>
> Regards,
> --
> Sam.
>
> _______________________________________________
> Tao-list mailing list
> Tao-list@...
> http://galactus.ximian.com/mailman/listinfo/tao-list
>
>
>


--
Erik Karlsson
erik.karlsson@...
+358 50 486 9050
_______________________________________________
Tao-list mailing list
Tao-list@...
http://galactus.ximian.com/mailman/listinfo/tao-list

Re: [patch] Compilation issues with Mono

by David_Hudson :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Fix has been uploaded. Thanks

tao-list-bounces@... wrote on 10/31/2007 05:46:50 PM:

> On Thu, Nov 01, 2007, Erik Karlsson wrote:
>
> > ./Glx.cs(1418,42): error CS0626:
> > `Tao.Platform.X11.Glx.glXGetSelectedEvent(System.IntPtr,
> > System.IntPtr, ulong)' is marked as an external but has no DllImport
> > attribute. Consider adding a DllImport attribute to specify the
> > external implementation
> > Compilation failed: 4 error(s), 0 warnings
> > make[1]: *** [bin/Debug/Tao.Platform.X11.dll] Error 1
> > make[1]: Leaving directory
> > `/home/ekarlsso/downloads/tao/src/Tao.OpenGl/autotools/Tao.
> OpenGl/Tao.Platform.X1
> >
> > Are these some well known issue or just a random situation in the
trunk?

>
>    Tao.Platform.X11 was checked in very recently so it's probably not
> well known. You may try the attached patch.
>
> Regards,
> --
> Sam.
> [attachment "200_dllimport_attributes.diff" deleted by David
> Hudson/INV/CG/CAPITAL] _______________________________________________
> Tao-list mailing list
> Tao-list@...
> http://galactus.ximian.com/mailman/listinfo/tao-list

_______________________________________________
Tao-list mailing list
Tao-list@...
http://galactus.ximian.com/mailman/listinfo/tao-list