기타 정보/정보공유-IT

아무리 구글링을 해도 관련 글을 찾을 수가 없어서 ChatGPT를 사용해 보았다. 비주얼 스튜디오에서 Any CPU로 빌드를 했을 때 실행파일 타입은 32비트로 나온다면 64비트로 작동하는 게 맞을까?

FreeBear 2023. 2. 2. 12:05
반응형

회사에서 32비트 프로젝트를 64비트로 전환을 하는 중에 클라이언트 중에 32비트 PC가 있을 수도 있으니 32비트용, 64비트용 두 가지로 나누는 건 복잡해진다고 Any CPU로 하라고 전달을 받았다.

 

Windows 10 64비트 컴퓨터에 있는 비주얼 스튜디오에서 Any CPU로 빌드를 했을 때 실행파일 타입이 32비트로 나온다면 64비트로 작동하는 게 맞을까?

64비트로 전환 할 때 Any CPU로 하지 않은 이유 중에 하나였다.

 

그동안 이 궁금증은 묻어만 두고 있다가 요근래 구글링을 해 보았지만 엉뚱한 결과물들만 나올 뿐이었다.

 

그래서 요새 유명해지고 있는 ChatGPT에 드디어 가입을 한 후 사용해보았다.

사용방법은 간단했다.

 

https://chat.openai.com/chat

에서 로그인 혹은 가입을 하면 위에 페이지 나오고, 저기서 궁금한 것, 질문할 것을 입력 후 엔터하면 된다.

 

Windows 10 64비트 컴퓨터에 있는 비주얼 스튜디오에서 Any CPU로 빌드를 했을 때 실행파일 타입이 32비트로 나온다면 64비트로 작동하는 게 맞을까? 

이 질문 내용을 파파고에서 영어로 번역하고 ChatGPT에 물어봤다.

그리고 나온 답변은 놀랍다.

Q: If the executable file type comes out as 32-bit when built with Any CPU in Visual Studio on a Windows 10 64-bit computer, is it correct to operate as 64-bit?

A: Yes, that's correct. When you build an executable as "Any CPU" in Visual Studio on a Windows 10 64-bit computer, the output file will be a 32-bit executable, but it can operate as either a 32-bit or 64-bit process depending on the architecture of the system it's running on.

On a 64-bit system like Windows 10, the operating system will automatically load the executable as a 64-bit process, allowing it to access the full memory capabilities of the system and take advantage of the 64-bit architecture. On a 32-bit system, it will be loaded as a 32-bit process, but it will still be able to run and function as intended.

So while the executable file itself is 32-bit, it can still operate as a 64-bit process when run on a 64-bit system, making it highly compatible and flexible.

파파고 번역: 네, 맞아요. Windows 10 64비트 컴퓨터의 Visual Studio에서 "Any CPU"로 실행 파일을 빌드하면 출력 파일이 32비트 실행 파일이 되지만 실행 중인 시스템의 아키텍처에 따라 32비트 또는 64비트 프로세스로 작동할 수 있습니다.

윈도우 10과 같은 64비트 시스템에서 운영 체제는 자동으로 실행 파일을 64비트 프로세스로 로드하여 시스템의 전체 메모리 기능에 액세스하고 64비트 아키텍처를 활용할 수 있다. 32비트 시스템에서는 32비트 프로세스로 로드되지만, 여전히 의도한 대로 실행되고 작동할 수 있습니다.

따라서 실행 파일 자체는 32비트이지만 64비트 시스템에서 실행할 때도 64비트 프로세스로 작동할 수 있으므로 호환성과 유연성이 높습니다.

 

나는 이 말을 믿고 Any CPU로 빌드하기로 마음 먹었다.

이제 일해야지.

반응형