에러모음/VS 에러2018. 2. 23. 14:35

오류

C2381 'exit': 재정의. '__declspec(noreturn)' 또는 '[[noreturn]]'이 다릅니다. Assimp_Test c:\program files (x86)\windows kits\10\include\10.0.16299.0\ucrt\stdlib.h 51


오류 이유

#include "glut\GL\glut.h"

#include <assimp/cimport.h>

#include <assimp/scene.h>

#include <assimp/postprocess.h>


stdlib.h의 exit가 재정의 되었다. glut.h를 선언한 후 stdlib.h를 선언하면 중복정의 에러로 처리한다.

stdlib.h를 직접 선언하지 않았지만 assimp 내부적으로 stdlib.h를 내포하고 있기에 중복선언으로 처리되었다.



해결

단순하게 assimp 헤더를 먼저 선언한 후 glut를 선언했다.

#include <assimp/cimport.h>

#include <assimp/scene.h>

#include <assimp/postprocess.h>

#include "glut\GL\glut.h"

Posted by 멜데스