alecthomas / entityx

EntityX - A fast, type-safe C++ Entity-Component system
MIT License
2.21k stars 295 forks source link

"entityx::EntityManager" has no member "each" #204

Closed K4kug3n closed 6 years ago

K4kug3n commented 6 years ago

Hi everyone, I installed EntityX recently, but i'm in trouble. I tried to compile the next exemple code :

temp

But it doesn't run, the function "each" of EntityManager isn't reconized. I don't find this function in the definition of the class EntityManager too, so i don't know what to do (This code work without the definition of "MovementSystem" so i think my linking is good)

If anyone can help me, Thanks for read/help (Sorry for this begginer english xd) Kakugen

L3nn0x commented 6 years ago

I see it in the EntityManager class : https://github.com/alecthomas/entityx/blob/master/entityx/Entity.h#L765 so I'm not sure what the problem is. Which version of MSVC are you using?

K4kug3n commented 6 years ago

I use MSVC 2017 free edition, on W10 I checked in my Entity.h, and it's completly different... My line 765, where is the .each definition in your file, is "friend class ComponentHandle;", This line is present in your file at the line 838 It's really strange, i don't have the same file

A simple copy/past resolve this probleme at all Sorry for disturb you, and thanks a lot for your help

L3nn0x commented 6 years ago

No problem, always keep your files updated with the latest version from github ;)

hak33m16 commented 6 years ago

I don't believe this was his fault. I just ran into it as well in W10 using CMake for VS 2017 with the entityx 1.1.2 package. The most recent release package listed on Github was 1.1.2, but there was a little ... icon that I could click on this page https://github.com/alecthomas/entityx/releases so I would say it's a design issue on Github's end.