.
« on: 19 January 2017, 09:18:40 »
.
« Last Edit: 03 May 2018, 05:35:26 by Czar05 »

*

texus

  • *****
  • 1272
    • View Profile
    • Texus's Blog
Re: Error with Static linking TGUI 0.6.1
« Reply #1 on: 19 January 2017, 10:42:41 »
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.

.
« Reply #2 on: 19 January 2017, 11:02:08 »
.

« Last Edit: 03 May 2018, 05:35:42 by Czar05 »

*

texus

  • *****
  • 1272
    • View Profile
    • Texus's Blog
Re: Error with Static linking TGUI 0.6.1
« Reply #3 on: 19 January 2017, 11:18:18 »
Quote
I'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?

Quote
I'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.
« Last Edit: 19 January 2017, 11:21:07 by texus »

.
« Reply #4 on: 19 January 2017, 11:35:47 »
.
« Last Edit: 03 May 2018, 05:35:58 by Czar05 »

.
« Reply #5 on: 19 January 2017, 11:45:54 »
.
« Last Edit: 03 May 2018, 05:36:11 by Czar05 »

*

texus

  • *****
  • 1272
    • View Profile
    • Texus's Blog
Re: Error with Static linking TGUI 0.6.1
« Reply #6 on: 19 January 2017, 11:50:20 »
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.
« Last Edit: 19 January 2017, 11:54:36 by texus »

.
« Reply #7 on: 19 January 2017, 12:03:09 »
.
« Last Edit: 03 May 2018, 05:36:34 by Czar05 »

.
« Reply #8 on: 19 January 2017, 12:34:17 »
.
« Last Edit: 03 May 2018, 05:36:52 by Czar05 »

*

texus

  • *****
  • 1272
    • View Profile
    • Texus's Blog
Re: Error with Static linking TGUI 0.6.1
« Reply #9 on: 19 January 2017, 12:37:40 »
You can't use TGUI 0.7 with VS2012 and SFML 2.1, it requires at least VS2013 and SFML 2.2.