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

Author Topic: SFGUI (0.4.0 released)  (Read 393297 times)

0 Members and 4 Guests are viewing this topic.

binary1248

  • SFML Team
  • Hero Member
  • *****
  • Posts: 1405
  • I am awesome.
    • View Profile
    • The server that really shouldn't be running
SFGUI
« Reply #45 on: November 01, 2011, 01:28:55 am »
Quote from: "Laurent"
This is so complicated...

Even if you didn't install SFML, you just have to copy FindSFML.cmake to <cmake install>/share/cmake-2.8/Modules, then set the SFMLDIR variable to the root of the "include" and "lib" directories of SFML, and magically, "Configure" works the very first time you click it ;)

Even better: set it as an environment variable, and you don't even have to do it everytime you configure a CMake project that uses SFML.


AFAIR I tried setting the environment variable but it didn't work for me. Maybe I did something wrong, but instead of trying to figure out why it didn't work I figured just spend 2 mins more and do it by hand as described above and it'll work. On my Linux system this was all over in 3 commands of course ^^. The people who say Linux is harder to use than Windows definitely have to try out CMake.
SFGUI # SFNUL # GLS # Wyrm <- Why do I waste my time on such a useless project? Because I am awesome (first meaning).

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
SFGUI
« Reply #46 on: November 01, 2011, 09:16:34 am »
Quote
AFAIR I tried setting the environment variable but it didn't work for me.

If SFMLDIR (not SFML_DIR) defines a path that has "include/SFML/Config.hpp" and "lib/<sfml libs>", it must work. Unless there's something weird in SFGUI configuration files ;)
Laurent Gomila - SFML developer

Tank

  • SFML Team
  • Hero Member
  • *****
  • Posts: 1486
    • View Profile
    • Blog
    • Email
SFGUI
« Reply #47 on: November 01, 2011, 01:05:37 pm »
This is everything SFGUI does to look for SFML: https://github.com/TankOs/SFGUI/blob/master/CMakeLists.txt#L9
Should be the preferred way of doing it.

Maybe the problem was that some of the guys here didn't install the library, but just built in. In that case FindSFML.cmake doesn't find the libraries because they're in the cache directory only. Headers of course are still found.

This all will get easier for some people when there will be a binary release of SFML 2, lol.

victorlevasseur

  • Full Member
  • ***
  • Posts: 206
    • View Profile
SFGUI
« Reply #48 on: November 01, 2011, 01:23:26 pm »
You've made a small mistake (not in Cmake), you wrote "Boost 1.45" ont the first page of this topic but the CmakeList need Boost 1.46.  :wink:

keyforge

  • Jr. Member
  • **
  • Posts: 65
    • View Profile
SFGUI
« Reply #49 on: November 01, 2011, 05:20:58 pm »
I have an issue with building the project created by CMake. It says that it can't find boost/signals2.hpp, yet the file exists in the boost directory.

I'm also interested in the VC++ 2010 binaries!
Need a place to upload your code, files or screenshots? Use SFML Uploads!

victorlevasseur

  • Full Member
  • ***
  • Posts: 206
    • View Profile
SFGUI
« Reply #50 on: November 01, 2011, 05:39:31 pm »
Have you correctly set the boost directory in cmake ?
You have to set it to the root folder of Boost (not the "boost" include sub-folder)

Naufr4g0

  • Full Member
  • ***
  • Posts: 112
    • View Profile
SFGUI
« Reply #51 on: November 01, 2011, 05:51:30 pm »
I solved CMake-related issue with SFGUI, but now I have some VS2010-related issues.. :/

Code: [Select]

error C2059: syntax error: '__declspec(dllexport)' C:\libs\SFGUI\include\SFGUI\Engine.hpp 15 1 sfgui


Incriminated lines are this (from Engine.hpp):

Code: [Select]

namespace sf {
std::ostream& SFGUI_API operator<<( std::ostream& stream, const Color& color );
std::istream& SFGUI_API operator>>( std::istream& stream, Color& color );
}

Tank

  • SFML Team
  • Hero Member
  • *****
  • Posts: 1486
    • View Profile
    • Blog
    • Email
SFGUI
« Reply #52 on: November 01, 2011, 06:05:19 pm »
For those having still issues with setting up CMake: Read the FAQ. You'll find solutions to the most common pitfalls there.

@Naufr4g0:
This is a known issue and has been fixed in another branch. I've cherry-picked the fix and applied it to master. So please pull the latest commits from the Git repository and rebuild, should work then.

keyforge

  • Jr. Member
  • **
  • Posts: 65
    • View Profile
SFGUI
« Reply #53 on: November 01, 2011, 06:16:59 pm »
Quote from: "victorlevasseur"
Have you correctly set the boost directory in cmake ?
You have to set it to the root folder of Boost (not the "boost" include sub-folder)


Yes, Boost_INCLUDE_DIR is set to C:/Library/boost_1_46_0/
Need a place to upload your code, files or screenshots? Use SFML Uploads!

Tank

  • SFML Team
  • Hero Member
  • *****
  • Posts: 1486
    • View Profile
    • Blog
    • Email
SFGUI
« Reply #54 on: November 01, 2011, 06:30:48 pm »
@keyforge:
(I was wrong, removed the assumption ;)). Please consult the FAQ, it explains how it's done right.

Naufr4g0

  • Full Member
  • ***
  • Posts: 112
    • View Profile
SFGUI
« Reply #55 on: November 01, 2011, 11:08:12 pm »
I finally managed to make SFGUI to work.
I have successfully started the test project on VS2010. :)

Tank

  • SFML Team
  • Hero Member
  • *****
  • Posts: 1486
    • View Profile
    • Blog
    • Email
SFGUI
« Reply #56 on: November 02, 2011, 10:20:34 am »
Very good! What helped you in solving your issues? (so that we can adjust the FAQ if others run into the same problems)

Question to everybody:
I'd like to know how many of you use C++11-supporting compilers? I've recently removed the complete Boost dependency by replacing several sub-systems with either our own ones or using C++11 features.

AFAIK MSVC supports at least TR1 beginning from MSVC 2008 SP1 and GCC beginning from version version 4.

If you want to test it, please give this a shot: c++11 branch @ GitHub (download as ZIP).

Important: The branch also includes the upcoming signalling system replacement and other optimizations, so if you have already used SFGUI in your projects, then builds will be definitely broken without adjustments. I suggest to build SFGUI and the test application in order to see if your compiler supports the code.

Would love to hear from results. :-)

Naufr4g0

  • Full Member
  • ***
  • Posts: 112
    • View Profile
SFGUI
« Reply #57 on: November 02, 2011, 11:35:31 am »
Quote from: "Tank"
Very good! What helped you in solving your issues? (so that we can adjust the FAQ if others run into the same problems)


I solved with the following CMake settings:

SFML 2.0


and unchecked BUILD_SHARED_LIBS.

SFGUI


and additionally I set this variable, as suggested by binary1248:

Code: [Select]
Name: CMAKE_MODULE_PATH
Type: PATH
Value: {SFML root directory}\cmake\Modules (The directory where FindSFML.cmake is.)

Naufr4g0

  • Full Member
  • ***
  • Posts: 112
    • View Profile
SFGUI
« Reply #58 on: November 02, 2011, 12:31:44 pm »
Tank, have you any user-guide in beta version? :D

victorlevasseur

  • Full Member
  • ***
  • Posts: 206
    • View Profile
SFGUI
« Reply #59 on: November 02, 2011, 06:36:54 pm »
Tank, I saw a "c++11" branch in SFGUI :
Are you going to apply C++11 soon ? It's a problem because a lot of users doesn't use C++11 now, and in my case, I don't now if I can use C++11 with GCC 4.5.2 (MinGW) (this compilator is required by Game Develop, so...)

 

anything