Main Menu

.

Started by Czar05, 19 January 2017, 09:18:40

Czar05

.
.

texus

These linking errors are not coming from TGUI, if you link SFML statically you also have to link SFML dependencies yourself.

If your project didn't give these errors before you linked TGUI then it would indicate that you are using an older SFML version while TGUI was compiled against the latest version.

Btw, you don't have to define TGUI_USE_STATIC_STD_LIBS.

Czar05

.
#2
.


texus

#3
QuoteI'm linking with the SFML that is packaged with TGUI.
TGUI doesn't come packaged with any SFML version. Where did you download it exactly?

QuoteI'm using SFML 2.1
SFML 2.1 has to be linked differently from later versions when linking statically (they changed it somewhere between 2.2 and 2.4). If you use a newer SFML version then you must also link to opengl, glew, jpeg, etc.

The SFML version used to build TGUI has to match perfectly with the SFML version you are using in your project. Based on the errors I would say that SFML > 2.1 was used when compiling TGUI and you are using SFML 2.1 in your project. You might want to try to recompile TGUI.

Edit: I thought it was a typo initially, but you should really update to TGUI 0.6.10, there have been many bug fixes since 0.6.1.

Czar05

.
#4
.

Czar05

.
#5
.

texus

#6
Ok, I finally understood the setup. I actually don't see any reason why it wouldn't work.
But the zip file you downloaded is almost 3 years old so I can't make any guarentees that what it contained is really correct. I used to distribute SFML libraries with TGUI back then because there were bugs in SFML 2.1 and SFML 2.2 that affected TGUI. So I actually doubt that these libraries are the real SFML 2.1, they are probably a version somewhere inbetween 2.1 and 2.2.

I would really just get the latest versions (SFML 2.4.1 and TGUI 0.6.10), what you have is 3 years old and contains many bugs. If possible I even recommend updating the compiler and use TGUI 0.7.2, but I understand if the compiler is not something you consider updating. The libraries on the other hand should be up-to-date or else I won't be able to support you much. Both SFML 2.4.1 and TGUI 0.6.10 still support VS2012.

I have binaries for TGUI 0.6 here but I have no idea for which SFML version they are compiled so you will likely have to compile TGUI yourself. That way you can also use any SFML version you want as long as it is 2.2 or higher. I removed support for SFML 2.1 some time ago.

Edit: If you really need SFML 2.1 you can always download https://github.com/texus/TGUI/archive/v0.6.1.zip and build that one instead of the latest TGUI version. But you will have to build TGUI yourself no matter what you choose, unless you update the compiler and download a binary for TGUI 0.7.

Czar05

.
#7
.

Czar05

.
#8
.

texus

You can't use TGUI 0.7 with VS2012 and SFML 2.1, it requires at least VS2013 and SFML 2.2.