Advertisement

Tao libraries and Linux

Started by December 19, 2004 12:57 AM
4 comments, last by nagromo 19 years, 10 months ago
I'm trying to get a program that I wrote with Tao.OpenGL and Tao.Sdl to run under Linux. Mono compiled my source fine, but when I try to run it I get this error:

Unhandled Exception: System.DllNotFoundException: SDL.dll
in <0x00053> (wrapper managed-to-native) Tao.Sdl.Sdl:SDL_Init (int)
in <0x0001c> EngineClient:Main (string[])
I'm using the Tao.*.dll files from his temporary website. I'm trying to get to his new site now. Do I need to somehow recompile the Tao libraries to use the Linux .so files instead of Windows .dll files?
Not being up on C# the only thing I can think to suggest is to make sure filenames have the right case (UPPER lower). Filenames in Linux are case sensitive.
My stuff.Shameless promotion: FreePop: The GPL god-sim.
Advertisement
The thing is that these libraries are looking for SDL.dll, while under Linux it's libSDL.so. I thought that Mono handled that automatically, but it's still getting errors.

I know the name of the file that I want it to use, but I don't know how to get it to use that file; it has a specialized post-processing build process that messes with the generated MSIL, so I don't know how to rebuild it for Linux.

I guess this is starting to look more like a .Net problem than a Linux problem.
In the /etc/mono/config file you'll have the option to DLL map files:

Add a line that says something like:

<dllmap dll="SDL.dll" target="sdl.so" />

Obviously change the sdl.so bit to whatever your SDL.so is actually called. Remember the path also has to be accessible to Mono.
Quote: Original post by nagromo
Do I need to somehow recompile the Tao libraries to use the Linux .so files instead of Windows .dll files?


Yes, check the build files, they should have some information, maybe. I haven't tried this though, but it should be no problem.

--edit--

The above might work :)

And yay, the new Tao site is up :D
Quote: Original post by evolutional
In the /etc/mono/config file you'll have the option to DLL map files:

Add a line that says something like:

<dllmap dll="SDL.dll" target="sdl.so" />

Obviously change the sdl.so bit to whatever your SDL.so is actually called. Remember the path also has to be accessible to Mono.


Thanks; that worked! (Although it requires modifications to be made as root, which isn't the best for the end-users.)

Randy Ridge, the creater of the library, actually gave me a different solution that doesn't require root access. I guess I hadn't updated every copy of the files to the newest version. (I have to come up with a good directory structure so I don't have a copy of each .dll for each project.) The newest version of the library comes with matching .config files for each .dll that automatically switch to the right version of the native libraries.

Sorry to bug all of you about this; thanks for the help.

This topic is closed to new replies.

Advertisement