SFML community forums

Help => General => Topic started by: LarryP on December 20, 2014, 07:34:20 pm

Title: SFML 2.2 not working?!
Post by: LarryP on December 20, 2014, 07:34:20 pm
I was using 2.1 and switched to 2.2 and am getting 96+ errors.  I am using VS 2012 and 2.2 32 bit.  Everything is just like I had setup for 2.1.  Template is the same exact settings.  I am stumped.
Title: Re: SFML 2.2 not working?!
Post by: Laurent on December 20, 2014, 07:49:59 pm
http://en.sfml-dev.org/forums/index.php?topic=5559.0
Title: Re: SFML 2.2 not working?!
Post by: LarryP on December 20, 2014, 07:59:00 pm
I'm sorry, but which part of that advice am I not adhering to?
Title: Re: SFML 2.2 not working?!
Post by: Hapax on December 20, 2014, 08:05:18 pm
You haven't told us what your problem is.
Title: Re: SFML 2.2 not working?!
Post by: eXpl0it3r on December 20, 2014, 08:11:46 pm
Since you didn't provide any errors what so ever, I'll guess that you're linking statically and haven't seen the new paragraphs in the tutorial: http://www.sfml-dev.org/tutorials/2.2/start-vc.php
Title: Re: SFML 2.2 not working?!
Post by: LarryP on December 20, 2014, 08:17:26 pm
I thought that with 96+ errors it said that my template is  not compiling.  I'm sorry if I did not post thorough enough, but when I read my post it makes sense to me, guess I'm biased.  :)

OK.  I have a 2.1 template setup with the instructions from here http://www.sfml-dev.org/tutorials/2.1/start-vc.php (http://www.sfml-dev.org/tutorials/2.1/start-vc.php).  It works fine with 2.1.  So I installed 2.2 into a similar directory and use the same settings from the 2.1 template from the above link.  However, when building the template I get 96+ errors.  I have cleaned out my Debug directory and done all I can think of.  Here is an example of an error, the first one in a long list:

Error   1   error LNK2019: unresolved external symbol __imp__glBlendFunc@8 referenced in function "private: void __thiscall sf::RenderTarget::applyBlendMode(struct sf::BlendMode const &)" (?applyBlendMode@RenderTarget@sf@@AAEXABUBlendMode@2@@Z)   E:\VS 2012 WORK\WORK\VC++\SFMLTemplate\sfml-graphics-s-d.lib(RenderTarget.cpp.obj)   SFMLTemplate
Title: Re: SFML 2.2 not working?!
Post by: Laurent on December 20, 2014, 08:20:27 pm
This function is new in SFML 2.2, so one possible explanation is that you're still linking to SFML 2.1 libraries. Showing a few more errors could confirm this (you can even post the full output, with a "spoiler" tag).
Title: Re: SFML 2.2 not working?!
Post by: eXpl0it3r on December 20, 2014, 08:26:08 pm
Quote
__imp__glBlendFunc ... graphics-s-d.lib

You're linking statically and thus need to link all of SFML's dependencies as described in the new tutorial.
Title: Re: SFML 2.2 not working?!
Post by: LarryP on December 20, 2014, 08:29:44 pm
Since you didn't provide any errors what so ever, I'll guess that you're linking statically and haven't seen the new paragraphs in the tutorial: http://www.sfml-dev.org/tutorials/2.2/start-vc.php

You fixed it!  I added those extra libraries and it compiles fine now.  Thank you sir.   :)

I had made the 2.1 template a few weeks ago and I went back down that list, but I did not see the new paragraphs.