Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OpenEcs in Visual Studio 2013 #8

Closed
DJuego opened this issue Dec 1, 2015 · 5 comments
Closed

OpenEcs in Visual Studio 2013 #8

DJuego opened this issue Dec 1, 2015 · 5 comments

Comments

@DJuego
Copy link

DJuego commented Dec 1, 2015

I am interested in building with OpenEcs in a Visual Studio 2013 environment. However...

\inc\OpenEcs\single_include\ecs.h(917): error C2621: 'ecs::details::BaseEntityAlias::entity_' : illegal union member; type 'ecs::Entity' has a copy constructor
\inc\OpenEcs\single_include\ecs.h(913): error C2065: 'entity_' : undeclared identifier
\inc\OpenEcs\single_include\ecs.h(1066): error C2614: 'ecs::details::BaseEntityAlias' : illegal member initialization: 'entity_' is not a base or member
\inc\OpenEcs\single_include\ecs.h(1068): error C2039: 'entity_' : is not a member of 'ecs::details::BaseEntityAlias'
\inc\OpenEcs\single_include\ecs.h(905) : see declaration of 'ecs::details::BaseEntityAlias'
\inc\OpenEcs\single_include\ecs.h(1068): error C2614: 'ecs::details::BaseEntityAlias' : illegal member initialization: 'entity_' is not a base or member
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========`

Any possibility? Thanks!

@Gronis
Copy link
Owner

Gronis commented Dec 1, 2015

Hi DJuego and thanks for reporting an issue!

I haven't tried to compile the project with VisualStudio 2013. But I'm using a build server called appveyor that runs Visual C++ (Visual Studio's C++ compiler), and it compiles the project fine. Perhaps the compiler in Visual Studio 2013 is older than the compiler used by appveyor.

The Entity uses a trivial constructor right now, but implemented manually. I've removed the copy constructor definition which might solve your problem above (not sure though). You can give it a go if you want, but I will probably have to install Visual Studio 2013 and test it out myself in order to solve it.

@DJuego
Copy link
Author

DJuego commented Dec 1, 2015

Thank you for your VERY SWIFT answer! Thanks!

Unfortunately the 'fix' generates different errors. :-)

\inc\openecs\single_include\ecs.h(916): error C2620: 'ecs::details::BaseEntityAlias::entity_' : illegal union member; type 'ecs::Entity' has a user-defined constructor or non-trivial default constructor
\inc\openecs\single_include\ecs.h(912): error C2065: 'entity_' : undeclared identifier
\inc\openecs\single_include\ecs.h(1065): error C2614: 'ecs::details::BaseEntityAlias' : illegal member initialization: 'entity_' is not a base or member
\inc\openecs\single_include\ecs.h(1067): error C2039: 'entity_' : is not a member of 'ecs::details::BaseEntityAlias'
\inc\openecs\single_include\ecs.h(904) : see declaration of 'ecs::details::BaseEntityAlias'
\inc\openecs\single_include\ecs.h(1067): error C2614: 'ecs::details::BaseEntityAlias' : illegal member initialization: 'entity_' is not a base or member

Anyway i am re-considering the problem and i think i have been unfair with you. The new-shiny-modern Visual Studio 2015 is more C++11/c++14 friendly. I will test it.

If you have a limited time and energy, I prefer you give your support to the new Visual Studio 2015. :-) Do not install the obsolete Visual Studio 2013. My two-cents.

Thank you, Gronis!

@Gronis
Copy link
Owner

Gronis commented Dec 1, 2015

No problem :) I just happend to be using github atm when you asked!

Anyway, if you look here you can see the build output from appveyor. It looks like it's using the compiler from Visual Studio 2015, so perhaps you should try using it instead.

Glad that you are trying out OpenECS!

@DJuego
Copy link
Author

DJuego commented Dec 3, 2015

Hi again! I can confirm the "manual" build of project-based current OpenEcs with Visual Studio 14 2015 (MSVC 19.0) is successfully! will begin to play with OpenEcs now. ;-}

@Gronis
Copy link
Owner

Gronis commented Dec 3, 2015

Perfect! Then, I will update the README with requirements for the compilers so that people know what compilers are tested :)

@Gronis Gronis closed this as completed Dec 3, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants