SFML community forums

Help => General => Topic started by: PewPew on October 22, 2014, 07:03:44 pm

Title: Some errors on official SFML book code in github
Post by: PewPew on October 22, 2014, 07:03:44 pm
Have not read the book yet. I just want to try if every code is working before reading the book.

Turns out i got 2 unresolved externals.

Here are they

Error   2       error LNK2019: unresolved external symbol "class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > __cdecl toString<__int64>(__int64 const &)" (??$toString@_J@@YA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@AB_J@Z) referenced in function "private: void __thiscall Game::updateStatistics(class sf::Time)"

Error   1       error LNK2019: unresolved external symbol "class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > __cdecl toString<unsigned int>(unsigned int const &)" (??$toString@I@@YA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@ABI@Z) referenced in function "private: void __thiscall Game::updateStatistics(class sf::Time)"      
Title: Re: Some errors on official SFML book code in github
Post by: Nexus on October 22, 2014, 11:03:22 pm
This hasn't happened to us, is this the 1:1 code from the latest Git revision?

What compiler and version? How is the file StringHelpers.inl included at that place?
Title: Re: Some errors on official SFML book code in github
Post by: PewPew on October 23, 2014, 03:45:12 am
 Im not really sure what version But here is the link

https://github.com/SFML/SFML-Game-Development-Book

and for my compiler. I am using VS2013
Title: Re: Some errors on official SFML book code in github
Post by: PewPew on October 24, 2014, 03:57:01 am
Could it be that this is because of my compiler?

Cause I just copy pasted every code on repo chap3 World..
Title: Re: Some errors on official SFML book code in github
Post by: zsbzsb on October 30, 2014, 02:04:46 pm
Since no one replied... where exactly did it say to copy and paste the code into a project?