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

Author Topic: Some errors on official SFML book code in github  (Read 2235 times)

0 Members and 1 Guest are viewing this topic.

PewPew

  • Newbie
  • *
  • Posts: 22
    • View Profile
Some errors on official SFML book code in github
« 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)"      

Nexus

  • SFML Team
  • Hero Member
  • *****
  • Posts: 6287
  • Thor Developer
    • View Profile
    • Bromeon
Re: Some errors on official SFML book code in github
« Reply #1 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?
Zloxx II: action platformer
Thor Library: particle systems, animations, dot products, ...
SFML Game Development:

PewPew

  • Newbie
  • *
  • Posts: 22
    • View Profile
Re: Some errors on official SFML book code in github
« Reply #2 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

PewPew

  • Newbie
  • *
  • Posts: 22
    • View Profile
Re: Some errors on official SFML book code in github
« Reply #3 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..

zsbzsb

  • Hero Member
  • *****
  • Posts: 1409
  • Active Maintainer of CSFML/SFML.NET
    • View Profile
    • My little corner...
    • Email
Re: Some errors on official SFML book code in github
« Reply #4 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?
Motion / MotionNET - Complete video / audio playback for SFML / SFML.NET

NetEXT - An SFML.NET Extension Library based on Thor

 

anything