2017-01-24 16 views
0

Visual Studio Express 2012에서 Allegro 5로 게임을 만들려고했지만 저장 한 이전 템플릿이 더 이상 작동하지 않습니다. VS는 구문 오류에서부터 선언되지 않은 식별자까지 모든 것을 다루는 file.h와 fmaths.h라는 두 개의 특정 파일에 대해 많이 불평합니다. 여기 내 오류는 다음과 같습니다Allegro 5가 작동하는 프로그램이 더 이상 작동하지 않습니다.

Error 1 error C2059: syntax error : '__cdecl' c:\allegro5-msvc11\include\allegro5\file.h 33 1 Super Boulder Whisperer 
Error 2 error C2061: syntax error : identifier 'ALLEGRO_FILE' c:\allegro5-msvc11\include\allegro5\file.h 33 1 Super Boulder Whisperer 
Error 3 error C2091: function returns function c:\allegro5-msvc11\include\allegro5\file.h 33 1 Super Boulder Whisperer 
Error 4 error C4430: missing type specifier - int assumed. Note: C++ does not support default-int c:\allegro5-msvc11\include\allegro5\file.h 33 1 Super Boulder Whisperer 
Error 6 error C2065: 'ERANGE' : undeclared identifier c:\allegro5-msvc11\include\allegro5\inline\fmaths.inl 43 1 Super Boulder Whisperer 
Error 7 error C2065: 'ERANGE' : undeclared identifier c:\allegro5-msvc11\include\allegro5\inline\fmaths.inl 72 1 Super Boulder Whisperer 
Error 8 error C2065: 'ERANGE' : undeclared identifier c:\allegro5-msvc11\include\allegro5\inline\fmaths.inl 95 1 Super Boulder Whisperer 
Error 9 error C2065: 'ERANGE' : undeclared identifier c:\allegro5-msvc11\include\allegro5\inline\fmaths.inl 172 1 Super Boulder Whisperer 
Error 10 error C2065: 'ERANGE' : undeclared identifier c:\allegro5-msvc11\include\allegro5\inline\fmaths.inl 194 1 Super Boulder Whisperer 
Error 11 error C2065: 'EDOM' : undeclared identifier c:\allegro5-msvc11\include\allegro5\inline\fmaths.inl 235 1 Super Boulder Whisperer 
Error 12 error C2065: 'EDOM' : undeclared identifier c:\allegro5-msvc11\include\allegro5\inline\fmaths.inl 246 1 Super Boulder Whisperer 

내 포함하고 한 번에이 프로그램이 동일한 시스템에 완벽하게 잘 구축 된 이후 의존성에 문제가 있음을 완전히 확신 아니에요. 어떤 아이디어?

+0

오류 목록 대신 출력 창으로 이동하여 궁극적으로 관련 파일을 찾습니다. 이러한 내용이 포함되기 전에 무언가가 깨질 수 있습니다. (오류 목록은 문맥을 표시하지 않기 때문에 잘못된 것이 무엇인지 알아내는 데 쓰레기입니다.) – molbdnilo

+0

출력 창에 보이는 주된 불만은 file.h (몇 가지 다른 것에 대해 불평 함)와 fmaths.inl (선언되지 않은 식별자에 대해 불평 함). 이것은 알레그로 파일이지만 실제 문제가 무엇인지는 완전히 확신 할 수 없습니다. –

+0

어떤 Allegro 버전을 사용하고 있습니까? 가장 최근의 Allegro 5 (5.2.2)에서 file.h의 33 행을 보면,'AL_METHOD' 매크로를 다시 정의하는 것 이외의 메시지를 얻을 수있는 방법이 없습니다. 그러나 fmaths.inl의 줄 번호는 5.2.2의 코드와 일치하지 않습니다. (어쨌든 *'#include "file.h"'전에 어떤 일이 일어나는지 알아야합니다. 파일을 출력합니다.) – molbdnilo

답변

0

내 포함 디렉토리를 수정 한 후 매우 유사한 문제가 발생했습니다. 빌드 출력 로그를 검사하여 비난 할 파일을 확인한 후 해당 파일에 포함되지 않은 헤더 파일에 대해 불만을 나타 냈습니다.

내 헤더 파일 중 하나가 Allegro에 포함 된 헤더 파일 중 하나와 동일한 이름을 가지며 파일을 찾을 때 include 디렉토리에 추가 한 새 경로가 우선 순위를 차지하는 것으로 나타났습니다. 그것은 Allegro가 실제로 찾고 있던 헤더 파일 대신 헤더 파일을 포함하고있었습니다.

사용 가능성이있는 "File.h", "IO.h"등과 같은 간단한 이름의 헤더 파일이있는 경우 다른 이름으로 바꾸십시오.