cyclone-physics icon indicating copy to clipboard operation
cyclone-physics copied to clipboard

collide_coarse.h now needs new include to compile under Linux

Open LucasCampos opened this issue 12 years ago • 2 comments

To correctly compile any demo, I needed to include cstddef on collide_coarse.h. Otherwise, the compilation fails with a lot of "'NULL’ was not declared in this scope" errors.

I'm using g++ version 4.6.3 on a Ubuntu 12.04.

LucasCampos avatar Nov 06 '12 13:11 LucasCampos

Ah, yes, c++11 has replaced NULL with nullptr, for type safety. There's a bunch of other optimizations we can make if we assume c++11.

Ian.

On 6 November 2012 13:47, LucasCampos [email protected] wrote:

To correctly compile any demo, I needed to include cstddef on collide_coarse.h. Otherwise, the compilation fails with a lot of "'NULL’ was not declared in this scope" errors.

I'm using g++ version 4.6.3 on a Ubuntu 12.04.

— Reply to this email directly or view it on GitHubhttps://github.com/idmillington/cyclone-physics/issues/12.

idmillington avatar Nov 06 '12 16:11 idmillington

Yes, there are. But, unfortunately, the MS compiler is not very advanced on implementing C++11 features. Then, any C++11 feature might break compatibility with windows.

LucasCampos avatar Nov 06 '12 16:11 LucasCampos