CMake Error when unchecking "TGUI_SHARED_LIBS"

Started by Honor, 24 March 2014, 00:19:31

Honor

I can't seem to figure out why this isn't working, maybe someone else has an idea?


I have downloaded the Code::Blocks Cmake files, and have hooked everything up correctly (I'm pretty sure). I've successfully configured the files once, and it says I need to specify the location. I type "H:Program Files/SFML" and the thing will configure fine.

IMAGE:



Now when I configure the file but leave the "TGUI_SHARED_LIBS" option unchecked. The thing gives me an error when I configure again.


I don't exactly see what I did wrong, and how I could fix it. So, any ideas?

texus

When linking statically, sfml now forces you to link to its dependencies yourself.

You can solve your problem by changing the FREETYPE_LIBRARY property to "H:/Program Files/SFML/extlibs/mingw/x68/freetype.a" (or something like that). Same for GLEW_LIBRARY and FREETYPE_LIBRARY.

But what tgui version are u using? I tried to make tgui automatically find these extlibs in v0.6.1. Maybe my fix is no longer working?

Also make sure not to change any properties after pressing 'configure'. Otherwise it might find the dynamic sfml libraries first and no longer look for the static ones when changing TGUI_SHARED_LIB. Always have the options correct before you press configure. And then when it gives you errors and more properties to fill in, only adjust the new ones and don't touch the old ones.
Try deleting the cache if you mess up somewhere.

Any reason why you are not using the precompiled tgui libraries? (if you are using mingw 4.8 then you would have a valid reason).

Honor

#2
Quote from: texus on 24 March 2014, 10:13:16
When linking statically, sfml now forces you to link to its dependencies yourself.

You can solve your problem by changing the FREETYPE_LIBRARY property to "H:/Program Files/SFML/extlibs/mingw/x68/freetype.a" (or something like that). Same for GLEW_LIBRARY and FREETYPE_LIBRARY.


I actually don't see any of the "extlibs" "mingw" "x68" or "freetype.a" keywords that you used as an example.



Quote from: texus on 24 March 2014, 10:13:16
But what tgui version are u using? I tried to make tgui automatically find these extlibs in v0.6.1. Maybe my fix is no longer working?



Quote from: texus on 24 March 2014, 10:13:16
Any reason why you are not using the precompiled tgui libraries? (if you are using mingw 4.8 then you would have a valid reason).
I thought the precompiled tgui libraries wouldn't include a static version like I needed.



By the way, sorry for the delay on getting back to you.

EDIT:
I just realized that I downloaded the 0.6 version from the tutorial page. (derp)
I'll get the 0.6.2 version right now.

texus

QuoteI actually don't see any of the "extlibs" "mingw" "x68" or "freetype.a" keywords that you used as an example.
It is included with the SFML download, but maybe it isn't installed.

QuoteI thought the precompiled tgui libraries wouldn't include a static version like I needed.
Not only does it include the static versions, it also includes a copy of the sfml extlibs folder (since v0.6.2).

Honor

Quote from: texus on 25 March 2014, 21:40:15
Not only does it include the static versions, it also includes a copy of the sfml extlibs folder (since v0.6.2).
I downloaded the precompiled version, and linked everything up. I've gotten everything to configure and generate fine. And on top of that, I've just finished building the tgui.cbp project with Code::Blocks. Thank you for helping me work through my foolish mistake!