tksuoran's picture

Building SVN OpenTK on Ubuntu 10.04

I get these errors:

opentk/Source/OpenTK/Input/KeyboardState.cs(45,26): error CS0106: The modifier `unsafe' is not valid for this item
opentk/Source/OpenTK/Input/MouseState.cs(45,26): error CS0106: The modifier `unsafe' is not valid for this item

Should I be able to build the SVN version on such old setup? And why are those unsafe, anyway?

Edit: Ok, the structs need unsafe keyword: "public unsafe struct KeyboardState..." - Then SVN OpenTK works also with Ubuntu 10.04 :-) (which has Mono C# compiler version 2.4.4.0)


Comments

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
the Fiddler's picture

Unfortunately, this is a compiler bug. I believe this was fixed either in Mono 2.4.7 or 2.6.0 - if you have access to a newer compiler, you could use that to create the binary (which should work on Mono 2.0+ without issue).

Note that it is possible to create a side-by-side Mono installation for testing purposes. Compiling Mono is pretty easy if you follow the instructions on its site (just be careful to install to use a prefix to avoid overwriting your existing installation - the Mono website has detailed instructions on side-by-side installations).