Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | ||||
4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 | 12 | 13 | 14 | 15 | 16 | 17 |
18 | 19 | 20 | 21 | 22 | 23 | 24 |
25 | 26 | 27 | 28 | 29 | 30 | 31 |
Tags
- sts4
- c++ set struct
- Plugins
- winsock.h Broadcast
- 의존주입
- ExtendWith
- __vsnprintf
- c++ Broadcast
- 확인할 수 없는 외부 기호
- git 대용량 파일
- 정적 라이브러리에서 MFC 사용
- esp-wroom-32d
- Flutter
- OpenCPN
- LINK2001
- 사전설치
- MFC
- OpenXLSX 한글
- c2678
- wxWidget
- _sprintf
- Mqtt
- git 최초 설정
- Console
- SQLite3
- OpenCPN설치
- .gitattributes
- 설치 테스트
- 멀티바이트 문자 집합 사용
- __snprintf
Archives
- Today
- Total
세상을 이롭게
VS LNK1104: 'kernel32.lib' 파일을 열 수 없습니다. 본문
VS2010이 설치되어 있고, VS2019가 설치된 상황에서 어느버전의 VS든 Win32 (x86)으로 개발하려 하니,
LNK1104: 'kernel32.lib' 파일을 열 수 없습니다. 에러가 났습니다.
확인할수 있는 방법은 C++ Console App 으로 새로운 프로젝트를 만들어 오류없이 컴파일되는지 확인해보면 됩니다.
확인 이후 LNK1104 에러가 난다면 아래와 같이 따라하십시오.
C:\Users\user\AppData\Local\Microsoft\MSBuild\v4.0
* 여기서 user는 본인 컴퓨터 이름입니다. 다를 수 있으며, 다를 경우 본인의 설정된 경로대로 들어가주세요
Microsoft.Cpp.Win32.user.props 파일을 notepad, notepad++ 등 editor로 열어주세요.
저의 경우
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<IncludePath>$(VCInstallDir)include;$(VCInstallDir)atlmfc\include;$(WindowsSdkDir)include;$(FrameworkSDKDir)\include;C:\Program Files (x86)\BCGSoft\BCGControlBarPro\BCGCBPro</IncludePath>
<LibraryPath>$(VCInstallDir)lib;$(VCInstallDir)atlmfc\lib;$(WindowsSdkDir)lib;$(FrameworkSDKDir)\lib;C:\Program Files (x86)\BCGSoft\BCGControlBarPro\bin</LibraryPath>
<PublicModuleDirectories>$(PublicModuleDirectories)</PublicModuleDirectories>
</PropertyGroup>
</Project>
와 같이 되어있었습니다.
아래의 IncludePath 와 LibraryPath를 추가해주세요.
<IncludePath>$(VC_IncludePath);$(WindowsSDK_IncludePath)</IncludePath>
<LibraryPath>$(VC_LibraryPath_x86);$(WindowsSDK_LibraryPath_x86)</LibraryPath>
저의 경우 아래와 같이 되었습니다.
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<IncludePath>$(VCInstallDir)include;$(VCInstallDir)atlmfc\include;$(WindowsSdkDir)include;$(FrameworkSDKDir)\include;C:\Program Files (x86)\BCGSoft\BCGControlBarPro\BCGCBPro;$(VC_IncludePath);$(WindowsSDK_IncludePath)</IncludePath>
<LibraryPath>$(VCInstallDir)lib;$(VCInstallDir)atlmfc\lib;$(WindowsSdkDir)lib;$(FrameworkSDKDir)\lib;C:\Program Files (x86)\BCGSoft\BCGControlBarPro\bin;$(VC_LibraryPath_x86);$(WindowsSDK_LibraryPath_x86)</LibraryPath>
<PublicModuleDirectories>$(PublicModuleDirectories)</PublicModuleDirectories>
</PropertyGroup>
</Project>
순수한 Path 는 아래와 같습니다.
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<IncludePath>$(VC_IncludePath);$(WindowsSDK_IncludePath)</IncludePath>
<LibraryPath>$(VC_LibraryPath_x86);$(WindowsSDK_LibraryPath_x86)</LibraryPath>
</PropertyGroup>
</Project>
이후 프로그램을 재시작하여 오류없이 컴파일되는지 확인하시면 됩니다.
끝.
'C,C++' 카테고리의 다른 글
[C++] LNK2001, LNK1120 Class static 사용시 문제 (0) | 2022.02.10 |
---|---|
VS MSB8008: 지정된 플랫폼 도구 집합(v142)이 설치되지 않았거나 올바르지 않습니다. (0) | 2021.11.29 |
VS Pointer Debugging (기초) (0) | 2021.11.29 |
[winbase.h] ini 형식 파일 작성하기 (0) | 2021.05.26 |
[VS2019] 창 분할시 재시작 하는 문제 (0) | 2021.05.07 |