Linux
Installing Mono
If you are using a recent Linux distribution, all prerequisites for OpenTK projects should be readily available: the Mono runtime and the Mono compilers. Execute "mono --version" and "gmcs --version" and check if the output looks like this:
Mono JIT compiler version 1.2.6 (tarball)
Copyright (C) 2002-2007 Novell, Inc and Contributors. www.mono-project.com
TLS: __thread
GC: Included Boehm (with typed GC)
SIGSEGV: altstack
Notifications: epoll
Architecture: amd64
Disabled: none
$ gmcs --version
Mono C# compiler version 1.2.6.0
If one or both of these commands fail, you'll have to install Mono. Mono packages should be readily available through your distribution's package manager, so a line like the following should work:
sudo apt-get install mono mono-gmcs
# or
su -c "apt-get install mono mono-gmcs"
# Fedora Core and .rpm-based distributions
su -c "yum install mono mono-gmcs"
mono --version returns something less than 1.2.6), you should build Mono from source. There is a message in the support forum describing the process of building mono from source here.
Alternatively, you can find binary packages at Mono Project's download page.
Using a binary release
Download the latest opentk-x.y.z-mono.tar.gz release from Sourceforge and untar it:
mono Examples.exe
The "Libraries" folder contains the main OpenTK assembly (OpenTK.dll) and the OpenTK.dll.config file - these are all you need to run OpenTK projects. If you are using MonoDevelop, check the "QuickStart" folder for a ready-to-use project. Last, don't forget to take a look at the release notes contained in the "Documentation" folder.
Troubleshooting
The following error has been reported on Fedora Core 8, when running Examples.exe:
at (wrapper managed-to-native) System.Drawing.GDIPlus:GdiplusStartup (ulong&,System.Drawing.GdiplusStartupInput&,System.Drawing.GdiplusStartupOutput&)
at System.Drawing.GDIPlus..cctor () [0x00000] --- End of inner exception stack trace ---
"/etc/mono/config". To correct this issue, open the aforementioned file (you must be root!), and add this line: <dllmap dll="gdiplus.dll" target="/usr/lib/libgdiplus.so.0" />. Now, Examples.exe should work.
Building OpenTK from source
OpenTK's build system currently uses NAnt, so you'll need to install that:sudo apt-get install nant
# Debian
su -c "apt-get install nant"
# Fedora
su -c "yum install nant"
cd opentk-0.3.13/Build
mono Build.exe mono
- Printer-friendly version
- Login or register to post comments




Comments
Dec 30
21:07:09Does not work out-of-the-box
posted by objarniDoes not work out-of-the-box in Ubuntu7.10 or earlier! For example Ubuntu7.10 uses mono1.2.4 which does not cooperate well with OpenTK0.3.13.
Dec 30
21:13:54Is there any chance NAnt
posted by objarniIs there any chance NAnt could be included into the source tree of OpenTK? That is, removing the need for installing NAnt, making it part of the build-process so to speak. (I think such a method is OK by both sf.net and NAnt license). This would really lower the threshold for helping out/making patches to OpenTK, that is only needing a compiler to build OpenTK.
Dec 30
23:52:16Problem is, nant is about
posted by the FiddlerProblem is, nant is about two to three times bigger than OpenTK so it wouldn't look very nice. I've been planning a pure makefile-based build system for Linux (make && make install), but there are more pressing matters to take care of first.
Indeed a visual studio project should be enough for Windows, and a makefile system for everything else. Since MonoDevelop/SharpDevelop can open visual studio projects now, there's no reason for the custom Build/Prebuild/Nant build system anymore.
Dec 31
11:16:19NAnt bin-folder version 0.86
posted by objarniNAnt bin-folder version 0.86 is approximately 7 mb big. As OpenTK grows, the ratio NAnt/OpenTK will be less of an issue anyway. Just removing 1.0 and 1.1 build targets and .xml-intellisense-files from NAnt/bin brought it down to 3.5 mb. Maybe thats more feasible?
Dec 31
11:29:00OpenTK now is 1MB (*), and
posted by the FiddlerOpenTK now is 1MB (*), and since nant packages are readily available I don't really see the point in making it bigger than it already is. If installing nant system-wide is a problem, you can create a SharpDevelop project (
mono Build.exe sharpdev) and build through the IDE.(*) I hope to get the next release down to 500-600KB.
Dec 31
13:06:57OpenTK now is 1MB (*), and
posted by objarniOpenTK now is 1MB (*), and since nant packages are readily available I don't really see the point in making it bigger than it already is.
Including NAnt binaries in the OpenTK source distribution does not affect OpenTK.dll size, I presume..? After all, OpenTK binary distribution (including OpenTK.xml) should still be the primary way of developing for OpenTK, at least that's my opinion. What I'm trying to say, there is a difference between developing applications for OpenTK, and developing OpenTK. When developing OpenTK, 3-4 mb extra is not that much..
Or I'll just shut up and install NAnt. But you must admit I made a fair argument ;)
Dec 31
13:19:00I was talking about the
posted by the Fiddler.I was talking about the download size, not the dll itself, but you do have a point. However, I just found out that Prebuild can generate makefiles, which means Nant's days are numbered anyway :)
I haven't tested that yet, but can you try running "mono Prebuild.exe" with the option to create makefiles? (I don't know which one that is off-hand, but it should list available options anyway). You should then be able to "make" OpenTK.
Dec 31
13:45:45[mono Prebuild.exe] Sorry I
posted by objarni[mono Prebuild.exe]
Sorry I don't have the time right now going out for new years eve celebration!
Happy new year everybody!