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

Author Topic: Weird Eclipse Mars Error involving Vector2?  (Read 1837 times)

0 Members and 1 Guest are viewing this topic.

Jamie_Edwards

  • Newbie
  • *
  • Posts: 7
    • View Profile
Weird Eclipse Mars Error involving Vector2?
« on: December 16, 2015, 01:33:49 am »
Hi guys,

So I'm currently following the "SFML Game Development" from Packt Publishing and I've come up with a very unusual error from my compiler.

So I'm using Eclipse Mars with MinGW and half way through chapter one I end up with the following class:

Game.hpp:
(click to show/hide)

and I get the following errors from my compiler:
(click to show/hide)

The thing I don't understand is that I used Visual Studio 2015 previous to this and got a lot further into the book than here without any hitch or errors relating to Vector2.

So my question is, what is happening and more importantly, how do I get rid of the errors so I can continue in Eclipse and not have to go back to VS2015...

Thanks guys,

Jamie.
« Last Edit: December 16, 2015, 02:53:29 am by Jamie_Edwards »

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 11034
    • View Profile
    • development blog
    • Email
Weird Eclipse Mars Error involving Vector2?
« Reply #1 on: December 16, 2015, 02:45:55 am »
You posted the header code twice. Did you accidentally include Vector2.inl instead of Vector2.hpp?
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

Jamie_Edwards

  • Newbie
  • *
  • Posts: 7
    • View Profile
Re: Weird Eclipse Mars Error involving Vector2?
« Reply #2 on: December 16, 2015, 03:00:31 am »
I did modify the OP with the correct code for Game.cpp and it turns out you're right.

Because I've been ctr+shift+o'ing, it's been including everything I need... including .inl files. So thank you very much for the help, couldn't find anything previous to this before so I'll leave this here.