Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: Install TGUI.NET  (Read 4157 times)

0 Members and 1 Guest are viewing this topic.

kazyamof

  • Newbie
  • *
  • Posts: 15
    • View Profile
    • Email
Install TGUI.NET
« on: July 11, 2017, 09:46:52 pm »
I'm following the instructions to install TGUI.NET on my project. These are the instrctions from the 'readme.txt':

"The dlls from the "dotnet" folder have to be added as References in your project.
The dlls from the "c" folder have to be placed next to your executable."

I'm referencing tguinet-0.8.dll on References
and pasting ctgui-0.8.dll and tgui.dll side by side my .exe.

When I try to instantiate a new Gui as here https://tgui.eu/bindings/dotnet/, I got the error:

System.DllNotFoundException: 'Could not load DLL 'ctgui-0.8.dll': Não foi possível encontrar o módulo especificado. (Exceção de HRESULT: 0x8007007E)'

Help! Wind 10 x 64, Visual Studio 2017, .NET 4.7
« Last Edit: July 11, 2017, 09:57:52 pm by kazyamof »

texus

  • Sr. Member
  • ****
  • Posts: 499
    • View Profile
    • TGUI
    • Email
Re: Install TGUI.NET
« Reply #1 on: July 11, 2017, 10:48:16 pm »
TGUI.Net isn't very well tested yet (as I don't have much experience with .Net myself). I'm actually planning to work on it again this weekend to bring it back up to date with the c++ version (which just received a few large changes), I'll have another look at how to install it then.
Make sure your project compiles as x64 and not x32 or Any CPU. The error could actually mean more than just the ctgui dll missing, it can also occurs when a dependency isn't there (e.g. tgui.dll missing). Did you also copy the sfml dlls? You have to use the exact files in the zip, both the .Net dlls for the References and the dlls that have to be copied next to the exe, you can't use any other SFML version. If you copied all dlls next to the exe, then I currently can't help much.

TGUI has its own forum at forum.tgui.eu btw.
TGUI: C++ SFML GUI

kazyamof

  • Newbie
  • *
  • Posts: 15
    • View Profile
    • Email
Re: Install TGUI.NET
« Reply #2 on: July 12, 2017, 02:06:16 am »
Replacing the default sfml.net dlls for the dlls inside the tgui zip file and is working now.

Why can't use the same sfml dlls from official website? What's the difference between them and the dlls inside TGUI.NET?

texus

  • Sr. Member
  • ****
  • Posts: 499
    • View Profile
    • TGUI
    • Email
Re: Install TGUI.NET
« Reply #3 on: July 12, 2017, 07:43:45 am »
The official CSFML dlls link statically to SFML. I have so far only been successful at getting TGUI.Net to work when everything is linked dynamically.

Otherwise both CSFML and TGUI link statically to SFML, so the SFML code would be duplicated in both the CSFML and CTGUI dll. This always lead to crashes in my tests, while linking dynamically worked fine.

I also can't guarantee that TGUI.Net can work if you use a different version of the SFML libraries, even if they link dynamically.
TGUI: C++ SFML GUI

 

anything