[Mono-bugs] [Bug 60997][Min] New - CS0626 is reported when the DllImport attribute is not found
bugzilla-daemon@bugzilla.ximian.com
bugzilla-daemon@bugzilla.ximian.com
Thu, 1 Jul 2004 14:44:54 -0400 (EDT)
Please do not reply to this email- if you want to comment on the bug, go to the
URL shown below and enter your comments there.
Changed by vargaz@freemail.hu.
http://bugzilla.ximian.com/show_bug.cgi?id=60997
--- shadow/60997 2004-07-01 14:44:54.000000000 -0400
+++ shadow/60997.tmp.899 2004-07-01 14:44:54.000000000 -0400
@@ -0,0 +1,41 @@
+Bug#: 60997
+Product: Mono: Compilers
+Version: unspecified
+OS:
+OS Details:
+Status: NEW
+Resolution:
+Severity:
+Priority: Minor
+Component: C#
+AssignedTo: mono-bugs@ximian.com
+ReportedBy: vargaz@freemail.hu
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL:
+Cc:
+Summary: CS0626 is reported when the DllImport attribute is not found
+
+When compiling the following test program:
+
+<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
+using System;
+using System.Text;
+
+public class Tests {
+
+ [DllImport("libglut.so")]
+ public static extern void glutInit(ref int argcp, StringBuilder[]
+argv);
+}
+<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
+
+mcs reports:
+bug-cs0626.cs(7) error CS0626: Method, operator, or accessor
+'Tests.glutInit(ref int,System.Text.StringBuilder[])' is marked external
+and has no attributes on it. Consider adding a DllImport attribute to
+specify the external implementation
+
+which is a bit confusing, while csc reports the more helpful CS0246: The
+type or namespace name 'DllImport' could not
+be found