Skip to content

Visual Studio compile errors with #define GLM_ENABLE_EXPERIMENTAL #884

@alicint

Description

@alicint

in one file in my project I needed to use hash.hpp and when I included it with:

#define GLM_ENABLE_EXPERIMENTAL
#include <glm/gtx/hash.hpp>

now the file random.inl fails to compile in visual studio (only).
the errors are:


Error	C2059	syntax error: ')'	glm\glm\gtc\random.inl	181	
Error	C2062	type 'unknown-type' unexpected	glm\gtc\random.inl	181	
Error	C2144	syntax error: 'unknown-type' should be preceded by '(' glm\gtc\random.inl	181	
Error	C2589	'(': illegal token on right side of '::'	glm\gtc\random.inl	181	

I tried undefining the flag immediately after hash.hpp included like this and it didn't work.

#define GLM_ENABLE_EXPERIMENTAL
#include <glm/gtx/hash.hpp>
#undef GLM_ENABLE_EXPERIMENTAL

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions