Tips2020. 5. 12. 16:30

비주얼 스투디오 2019로 작업을 하다가 빌드 시 아래와 같은 황당한 에러를 맞은 일이 있다.

  Generating code
LINK : fatal error C1001: Internal compiler error.
  (compiler file 'd:\agent\_work\5\s\src\vctools\Compiler\Utc\src\p2\main.c', line 182)
   To work around this problem, try simplifying or changing the program near the locations listed above.
  If possible please provide a repro here: www.developercommunity.visualstudio.com
  Please choose the Technical Support command on the Visual C++ 
   Help menu, or open the Technical Support help file for more information
    link!InvokeCompilerPass()+0x3703f
    link!InvokeCompilerPass()+0x2894b
    link!InvokeCompilerPass()+0x28850
    link!InvokeCompilerPass()+0x35f0a
  
  
LINK : fatal error LNK1000: Internal error during IMAGE::BuildImage

 

이 에러는 정말 인터넷을 아무리 뒤져 봐도 똑 부러진 해결책을 찾을 수 없었다. 우선 회사 계정으로 MS 기술지원을 받으려고 봤더니 기술지원 라이센스를 따로 구매해야 하는 것 같았다... 그래서 그냥 혼자서 해결하려고 삽질을 좀 했다.

몇 시간 삽질 끝에 찾아낸 방법은... (모든 상황에 동일하게 적용되는지 알 수 없으니 주의)

 

각종 캐시 및 빌드 파일들을 지워주기

 

먼저, 아래 나열(모든 VS 버전)된 폴더와 파일들을 지워준다. 솔루션 안의 모든 프로젝트 폴더에서 지워야 한다.

 .vs

 x64

 Debug

 Release

 ipch

 *.VC.db

 *.sdf

 *.suo

 ...

 

다 지우고 깨끗하게 만든 다음 다시 솔루션을 로딩하고 빌드하면 잘된다.

 

Posted by JMAN