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

Author Topic: SFML and SFGUI cmake problem  (Read 2063 times)

0 Members and 1 Guest are viewing this topic.

magneonx

  • Full Member
  • ***
  • Posts: 141
    • MSN Messenger - magnumneon04@hotmail.com
    • View Profile
SFML and SFGUI cmake problem
« on: March 19, 2013, 09:58:29 am »
Hello!!! I will try to elaborate the procedures that I undergone to build SFML 2.0 and SFGUI

First I didn't download SFML 2.0 on the official website because it doesnt work for me. I am using C::B ver 12 and MinGW ver 4.7 and yes I download both C::B and MinGW separately. So what I have done to make SDFML to work for me is to build it from source.

I built it using Cmake and I have successfully made it to work.

I have done the same thing with sfgui. I downloaded a version of SFGUI not from the official site but from git-repo again, to my surprise there are many versions of it. I downloaded my copy from brangex because it is the 1st hit on google. When I try to run the examples, strange error appear. I have read the web and found that it is because the version of the DLL mismatches. So what I have done is to build SFGUI the same way I built SFML 2.0.

It throws bunch of errors which I think I have troubleshooted properly, like it cannot find the SFML_ROOT and some errors that say it can't find the FindSFML.cmake on the CMAKE_MODULE_DIR so what I have done is I pasted SFML folder I downloaded from the git repo and pasted along side the built lib folder. It worked. Another error occured is that it cannot find the SFML_INCLUDE_DIR so I reallign the folders, this time I specify the SFML that I pasted inside the SFGUI folder. Then after all that it went to successfully being configured.

Now when I go cmd and build the libraries. There is strange error that occured. It relates to the syntax that says something like there is no function call for m_texture_atlas.bind(); etc etc. A kind of C++ error which says that call doesn't exists.

What I have done is to uncomment that line from the source code and went on on building it again. Now I got it to work.

I went on to the built folder and onto the examples folder and I try to run some of the executables there. It worked!!! Yay!!! But there is something wrong. The font appears to be missing. It is like jumbled boxes.

Any help will be great!


eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 10998
    • View Profile
    • development blog
    • Email
Re: SFML and SFGUI cmake problem
« Reply #1 on: March 19, 2013, 11:04:36 am »
First I didn't download SFML 2.0 on the official website because it doesnt work for me. I am using C::B ver 12 and MinGW ver 4.7 and yes I download both C::B and MinGW separately. So what I have done to make SDFML to work for me is to build it from source.
The RC is not compatible with GCC 4.7.x, that's why one has to rebuild SFML.

I downloaded a version of SFGUI not from the official site but from git-repo again, to my surprise there are many versions of it. I downloaded my copy from brangex because it is the 1st hit on google.
Well that's where you got derailed. There's only one true git repository, that is the official one. All the other ones are forks and are most likely outdated or modified.
The official one can be found on the official website. And no, it's not on GitHub!
git://boxbox.org/SFGUI.git

It throws bunch of errors which I think I have troubleshooted properly, like it cannot find the SFML_ROOT and some errors that say it can't find the FindSFML.cmake on the CMAKE_MODULE_DIR
That's normal for SFGUI. You need to either set CMAKE_MODULE_PATH to path_to_sfml/cmake/Modules/ or you copy the FindSFML.cmake to your shared CMake modules directory.
Then you'll have to set SFML_ROOT to path_to_sfml.

Both variables have to be added manually. If you use the GUI just press the "Add Entry" button. If you use the command line, you simply add them with the -D option.

Now when I go cmd and build the libraries. There is strange error that occured. It relates to the syntax that says something like there is no function call for m_texture_atlas.bind(); etc etc. A kind of C++ error which says that call doesn't exists.
That simply means that the SFML version SFGUI is written for doesn't match, i.e. the bind function has changed. Which again means you've cloned an outdated and non-official repository.

What I have done is to uncomment that line from the source code and went on on building it again. Now I got it to work.

I went on to the built folder and onto the examples folder and I try to run some of the executables there. It worked!!! Yay!!! But there is something wrong. The font appears to be missing. It is like jumbled boxes.
Well that's also a way to break the renderer. xD
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

 

anything