SFML community forums

Bindings - other languages => C => Topic started by: grok on June 07, 2014, 04:40:42 pm

Title: Cmake problem: outdated ConvertRenderStates.hpp (if I am right).
Post by: grok on June 07, 2014, 04:40:42 pm
Hello. I cloned the CSFML repo and tried to build (rev. 8478569) and got an error:
Quote
[ 45%] Building CXX object src/SFML/Graphics/CMakeFiles/csfml-graphics.dir/RenderTexture.cpp.o
In file included from /home/varnie/thrash/bar/CSFML/src/SFML/Graphics/RenderTexture.cpp:37:0:
/home/varnie/thrash/bar/CSFML/src/SFML/Graphics/ConvertRenderStates.hpp: In function ‘sf::RenderStates convertRenderStates(const sfRenderStates*)’:
/home/varnie/thrash/bar/CSFML/src/SFML/Graphics/ConvertRenderStates.hpp:47:40: error: no match for ‘operator=’ in ‘sfmlStates.sf::RenderStates::blendMode = states->sfRenderStates::blendMode’
/home/varnie/thrash/bar/CSFML/src/SFML/Graphics/ConvertRenderStates.hpp:47:40: note: candidate is:
In file included from /home/varnie/thrash/bar/SFML/include/SFML/Graphics/RenderTarget.hpp:36:0,
                 from /home/varnie/thrash/bar/SFML/include/SFML/Graphics/RenderTexture.hpp:33,
                 from /home/varnie/thrash/bar/CSFML/src/SFML/Graphics/RenderTextureStruct.h:31,
                 from /home/varnie/thrash/bar/CSFML/src/SFML/Graphics/RenderTexture.cpp:29:
/home/varnie/thrash/bar/SFML/include/SFML/Graphics/BlendMode.hpp:41:26: note: sf::BlendMode& sf::BlendMode::operator=(const sf::BlendMode&)
/home/varnie/thrash/bar/SFML/include/SFML/Graphics/BlendMode.hpp:41:26: note:   no known conversion for argument 1 from ‘const sfBlendMode’ to ‘const sf::BlendMode&’
make[2]: *** [src/SFML/Graphics/CMakeFiles/csfml-graphics.dir/RenderTexture.cpp.o] Error 1
make[1]: *** [src/SFML/Graphics/CMakeFiles/csfml-graphics.dir/all] Error 2
make: *** [all] Error 2


The line having an error:
    sfmlStates.blendMode = static_cast<sf::BlendMode>(states->blendMode);
 

Looks like the CSFML repo doesn't reflect the last changes of that part in the SFML lib.
Pardon me if it bothers you.
Title: Re: Cmake problem: outdated ConvertRenderStates.hpp (if I am right).
Post by: Laurent on June 07, 2014, 06:38:27 pm
Indeed, CSFML is not up to date.
Title: Re: Cmake problem: outdated ConvertRenderStates.hpp (if I am right).
Post by: zsbzsb on June 08, 2014, 03:19:30 am
I already have an almost complete fix for this on my local machine. Expect a PR in a few days.  :)
Title: Re: Cmake problem: outdated ConvertRenderStates.hpp (if I am right).
Post by: zsbzsb on June 08, 2014, 09:38:48 pm
I have finished the updates and you can see it here (https://github.com/SFML/CSFML/pull/38). Just waiting for Laurent to merge now.