Linux usage

Started by netrick, 31 July 2013, 09:42:39


TGUI requires Tao.OpenGL (dll files are included), which means that you will have to add a dllmap just as you had to do for sfml. You can put this inside /etc/mono/config.

I think it's a very bad thing. You should tell people to use local config file in app's directory.
The main reason is redistributing an app.


Alright, but could you point me to some documentation on how to do that?

I assume that this will be slightly different when compiling through the terminal or with MonoDevelop?


Everything is the same. If mono finds the local conf file, it will use this (along with global dll map).

When you have mono executable "app.exe" you simply create "app.exe.config" in its directory. And you put normal xml dll map there. I don't know but mono develop should have option to create it inside project but I never really looked into it.


I just can't get it to work.

I created the app.exe.config, but it seems to ignore it. I had the configuration tag with the dllmap tags in it, but I got a "System.DllNotFoundException: csfml-graphics-2" error. (also tried leaving the 'configuration' away and only have the dllmap tags)

You just compile like this, right?
mcs -r:sfmlnet-window-2,sfmlnet-graphics-2,tguinet LoginScreen.cs
It seems to completely ignore the LoginScreen.exe.config file.

By the time I placed the lines back into /etc/mono/config, something has been messed up and I now have the error "System.DllNotFoundException: /usr/local/lib/" again. From what I've seen so far, this error can be caused by basically anthing and I don't have a clue what I changed.
Edit: I think I already know what is causing this. I'm on a 64bit system and I installed 32bit libraries because MonoDevelop only works 32bit, while running mono in the terminal is 64bit.

So it is going to take some time to get a decent tutorial online if I can't even get it work myself.
And my first atempt to use it on windows has failed as well, but I guess I should just try with recompiling the lib with Visual Studio.


Hmm I don't know why it doesn't work for you, maybe I forgot something... I will take a look into it.

I don't compile using terminal, I use mono develop.

netrick This is the config documentation. I still don't know why it doesn't work for you though.


I'll try to figure it out.
But my priority is with the c++ version right now, so its going to take some time.

If I'm lucky then it is just now working because it can't find the libraries because of the 32bit vs 64bit issue. I'll try to install a 32bit OS on my laptop to avoid accidentally having the wrong libs. My cinnamon environment crashed a few days ago and I am now forced to work on gnome shell, so I was going to install another linux anyway (as the problem seems to be beyond repair).

Thanks for the link to the doc. I had only found the docs of the dllmap earlier which didn't specify in which file I had to put the lines which is why I ended up putting it in /etc/mono/config.


Hmm I'm on linux 64bit. I use SFML.Net 64 bit binaries and my MonoDevelop works in the 64 bit runtime. As far as I know, mono (and .net basically) produces binaries that are 64bit on 64 bit OS and 32bit on 32bit OS thanks to just in time compiler (specify something like "any cpu" build target, I don't remember exactly).

My app compiled on 64 bit linux with 64 bit libs works just fine on this linux and also runs on 32 bit windows xp without recompilation.

I think you shouldn't install 32 bit OS, it's pointless (unless you are limited on ram size).


I finally had the time to continue with the c# version again.
You were right, if you download the right files then there aren't really any problems with 64bit.

I needed to add two files to get it working. Putting it in app.exe.config doesn't seem to work.
The tutorial will be updated in the next few days to contain this information.

<dllmap dll="csfml-window-2" target="/usr/local/lib/"/>
<dllmap dll="csfml-graphics-2" target="/usr/local/lib/"/>

<dllmap dll="opengl32.dll" target="/usr/lib/"/>