coggy9's picture

libx11.dll not found and other errors.

I am trying to run a few demos for Move.Me and when I go to debug them, I'm seeing errors about a libx11.dll not found,and other errors that refer to OpenTK. I'm kinda new to C# programming... so here is a video of what happens when I start debugging,and the errors that VS2010 lists .
If anyone wants to look at the code, its up on Google Code.
I am using Windows 7 Ultimate x64 SP1,the app is in x86(Get a memory error with x64),using .NET 3.5, and I'm using the default ATI drivers for my card.


Comment viewing options

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

The exceptions for libX11 and libEGL are a normal and expected part of the startup process (OpenTK is checking driver capabilities). These are thrown and caught internally and shouldn't cause any issues.

The exception on using Invoke/BeginInvoke before the creation of the control are more significant. Find out where they are coming from and either refactor your code to avoid them or add a call to "CreateControl" to make sure the Control is created. They are usually caused by calling methods of a child control from the contructor or the Load event of its parent control.

MoKa's picture

Lib may exist, but found that this lib (libX11.dll) has dependencies, check if other libs exists.
I downloaded one from net (xppwin), in archive it has libX11.dll and it is dependent on cygwin1.dll. Dropping both of them in system32 will fix an issue in my case.

the Fiddler's picture

Do note that you are running OpenTK over an X11 server on Windows. This is a completely untested configuration (and I'm rather surprised to hear it works).

Normally, OpenTK uses plain win32 on Windows, there is no need to install an X server.

MoKa's picture

After several researches and tests, interesting thing that i found out weird behaviour. Before it was trying to create it using X11 Server.
But then I changed context to GLES 2.0 (Embedded, major:2, minor:0), and installed Khronos OpenGLES 2.0 SDKs PC Emulator for Windows, and it started to creating proper context, using OpenTK.Platform.Windows.
After I installed same Linux Emulator or Ubuntu, and it does runs GLES 2.0 context, but uses OpenTK.Platform.X11. And it works. I had to install two .so files and keep another two in folder and it works. Probably I will be able to rid of folder libs as well.
But before when I was trying to debug on Mono, it was doing this weird X11 thingy.

I did some changes on OpenTK sources, just for tests, but not sure that this is why. Probably some installations helped (GLES Emulator and so on).

Now I am trying to run same thing on i.MX53 (ARM) board, using same Linux Ubuntu system on it. But for now I have fails, on eglInitialize function, it returns random error numbers, that are not registered anywhere.
But I think problem is just before somewhere.
Weird, but under Windows and Ubuntu laptop, display it does initialize has number 1 or 2, but on i.MX53 its big random numbers every run.

I will still try to sort it out.
Have small example that comes with PoverVR driver for linux ARM, and there is example written in C++, and it works, i've got sources, and will try to do research on OpenTK to make it works.

BTW, does new releases is coming?

rrrmmm's picture

I am using opentk too and also over n X11 server on Windows..But still not facing any kind of dll failed error....whatever its untested configuration...

tbk's picture

I've found same error when using MonoDevelop 2.8.2, Mono 2.10.6 and latest stable OpenTK (opentk-2010-10-06.exe) with WinXP SP3 with no X11 server.

This exception (libx11.dll not found) is always thrown if you setting Mono as target runtime (but only if you trying to debug your app). In release configuration (or if you just launching your app with Ctrl+F5) this exception is not thrown. If you use .NET as target runtime and trying to debug your app this exception will be not thrown either.

By the way, you can skip this exception by pressing "Step Over" button. Game window will appear then.

But what is this? Bug? Of MonoDevelop? Or OpenTK? Why does it need X11 when i'm on Windows?

MoKa's picture

I think its because it tries to find dependencies and supported platform, after it will find it, it will use supported platform bindings to initialize Window and attach GL Context to it.
I manage somehow to rid of it, I don't actually remember how, but I don't have it any more, maybe because I installed GLES emulator DLL's and trying to initialize EGL context (embedded).