Skip to content

Commit 584822f

Browse files
解决Bug 29,RC文件中引用VC-LTL编译失败(#29
1 parent 2083ae3 commit 584822f

File tree

13 files changed

+325
-18
lines changed

13 files changed

+325
-18
lines changed

TargetPlatform/10.0.10240.0/header/vcruntime.h

+3-3
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,17 @@
22
#include "..\..\header\VC_LTL_Config.h"
33

44
#ifndef _LTL_vcruntime_module_type
5-
#define _LTL_vcruntime_module_type _LTL_vcruntime_module_type_from_ucrtbase
5+
#define _LTL_vcruntime_module_type 2/*_LTL_vcruntime_module_type_from_ucrtbase*/
66
#endif
77

88

99
#ifndef _LTL_ucrt_module_type
10-
#define _LTL_ucrt_module_type _LTL_ucrt_module_type_from_ucrtbase
10+
#define _LTL_ucrt_module_type 0/*_LTL_ucrt_module_type_from_ucrtbase*/
1111
#endif
1212

1313

1414
#ifndef _LTL_vccorlib_module_type
15-
#define _LTL_vccorlib_module_type _LTL_vccorlib_module_type_form_wincorlib
15+
#define _LTL_vccorlib_module_type 1/*_LTL_vccorlib_module_type_form_wincorlib*/
1616
#endif
1717

1818
#include <..\include\vcruntime.h>

TargetPlatform/10.0.19041.0/header/vcruntime.h

+3-3
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,17 @@
22
#include "..\..\header\VC_LTL_Config.h"
33

44
#ifndef _LTL_vcruntime_module_type
5-
#define _LTL_vcruntime_module_type _LTL_vcruntime_module_type_from_ucrtbase
5+
#define _LTL_vcruntime_module_type 2/*_LTL_vcruntime_module_type_from_ucrtbase*/
66
#endif
77

88

99
#ifndef _LTL_ucrt_module_type
10-
#define _LTL_ucrt_module_type _LTL_ucrt_module_type_from_ucrtbase
10+
#define _LTL_ucrt_module_type 0/*_LTL_ucrt_module_type_from_ucrtbase*/
1111
#endif
1212

1313

1414
#ifndef _LTL_vccorlib_module_type
15-
#define _LTL_vccorlib_module_type _LTL_vccorlib_module_type_form_wincorlib
15+
#define _LTL_vccorlib_module_type 1/*_LTL_vccorlib_module_type_form_wincorlib*/
1616
#endif
1717

1818
#include <..\include\vcruntime.h>

TargetPlatform/5.1.2600.0/header/vcruntime.h

+3-3
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,17 @@
22
#include "..\..\header\VC_LTL_Config.h"
33

44
#ifndef _LTL_vcruntime_module_type
5-
#define _LTL_vcruntime_module_type _LTL_vcruntime_module_type_from_msvcrt
5+
#define _LTL_vcruntime_module_type 1/*_LTL_vcruntime_module_type_from_msvcrt*/
66
#endif
77

88

99
#ifndef _LTL_ucrt_module_type
10-
#define _LTL_ucrt_module_type _LTL_ucrt_module_type_from_msvcrt
10+
#define _LTL_ucrt_module_type 1/*_LTL_ucrt_module_type_from_msvcrt*/
1111
#endif
1212

1313

1414
#ifndef _LTL_vccorlib_module_type
15-
#define _LTL_vccorlib_module_type _LTL_vccorlib_module_type_form_vccorlib140
15+
#define _LTL_vccorlib_module_type 0/*_LTL_vccorlib_module_type_form_vccorlib140*/
1616
#endif
1717

1818
#include <..\include\vcruntime.h>

TargetPlatform/5.2.3790.0/header/vcruntime.h

+3-3
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,17 @@
22
#include "..\..\header\VC_LTL_Config.h"
33

44
#ifndef _LTL_vcruntime_module_type
5-
#define _LTL_vcruntime_module_type _LTL_vcruntime_module_type_from_msvcrt
5+
#define _LTL_vcruntime_module_type 1/*_LTL_vcruntime_module_type_from_msvcrt*/
66
#endif
77

88

99
#ifndef _LTL_ucrt_module_type
10-
#define _LTL_ucrt_module_type _LTL_ucrt_module_type_from_msvcrt
10+
#define _LTL_ucrt_module_type 1/*_LTL_ucrt_module_type_from_msvcrt*/
1111
#endif
1212

1313

1414
#ifndef _LTL_vccorlib_module_type
15-
#define _LTL_vccorlib_module_type _LTL_vccorlib_module_type_form_vccorlib140
15+
#define _LTL_vccorlib_module_type 0/*_LTL_vccorlib_module_type_form_vccorlib140*/
1616
#endif
1717

1818
#include <..\include\vcruntime.h>

TargetPlatform/6.0.6000.0/header/vcruntime.h

+3-3
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,17 @@
22
#include "..\..\header\VC_LTL_Config.h"
33

44
#ifndef _LTL_vcruntime_module_type
5-
#define _LTL_vcruntime_module_type _LTL_vcruntime_module_type_from_msvcrt
5+
#define _LTL_vcruntime_module_type 1/*_LTL_vcruntime_module_type_from_msvcrt*/
66
#endif
77

88

99
#ifndef _LTL_ucrt_module_type
10-
#define _LTL_ucrt_module_type _LTL_ucrt_module_type_from_msvcrt
10+
#define _LTL_ucrt_module_type 1/*_LTL_ucrt_module_type_from_msvcrt*/
1111
#endif
1212

1313

1414
#ifndef _LTL_vccorlib_module_type
15-
#define _LTL_vccorlib_module_type _LTL_vccorlib_module_type_form_vccorlib140
15+
#define _LTL_vccorlib_module_type 0/*_LTL_vccorlib_module_type_form_vccorlib140*/
1616
#endif
1717

1818
#include <..\include\vcruntime.h>

TargetPlatform/6.2.9200.0/header/vcruntime.h

+3-3
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,17 @@
22
#include "..\..\header\VC_LTL_Config.h"
33

44
#ifndef _LTL_vcruntime_module_type
5-
#define _LTL_vcruntime_module_type _LTL_vcruntime_module_type_from_msvcrt
5+
#define _LTL_vcruntime_module_type 1/*_LTL_vcruntime_module_type_from_msvcrt*/
66
#endif
77

88

99
#ifndef _LTL_ucrt_module_type
10-
#define _LTL_ucrt_module_type _LTL_ucrt_module_type_from_msvcrt
10+
#define _LTL_ucrt_module_type 1/*_LTL_ucrt_module_type_from_msvcrt*/
1111
#endif
1212

1313

1414
#ifndef _LTL_vccorlib_module_type
15-
#define _LTL_vccorlib_module_type _LTL_vccorlib_module_type_form_wincorlib
15+
#define _LTL_vccorlib_module_type 1/*_LTL_vccorlib_module_type_form_wincorlib*/
1616
#endif
1717

1818
#include <..\include\vcruntime.h>
+66
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3+
<ItemGroup Label="ProjectConfigurations">
4+
<ProjectConfiguration Include="Release|Win32">
5+
<Configuration>Release</Configuration>
6+
<Platform>Win32</Platform>
7+
</ProjectConfiguration>
8+
</ItemGroup>
9+
<PropertyGroup Label="Globals">
10+
<VCProjectVersion>16.0</VCProjectVersion>
11+
<Keyword>Win32Proj</Keyword>
12+
<ProjectGuid>{d0002e52-94f3-458c-b135-16502fee1a3f}</ProjectGuid>
13+
<RootNamespace>RCBuildTest</RootNamespace>
14+
<WindowsTargetPlatformVersion>$([Microsoft.Build.Utilities.ToolLocationHelper]::GetLatestSDKTargetPlatformVersion('Windows', '10.0'))</WindowsTargetPlatformVersion>
15+
<SymbolsTestCppRootPathTmp>$(SymbolsTestCppRootPath)</SymbolsTestCppRootPathTmp>
16+
<SymbolsTestCppRootPathTmp Condition="'$(SymbolsTestCppRootPathTmp)' == ''">$(Platform)\$(Configuration)\</SymbolsTestCppRootPathTmp>
17+
</PropertyGroup>
18+
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
19+
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
20+
<ConfigurationType>DynamicLibrary</ConfigurationType>
21+
<UseDebugLibraries>false</UseDebugLibraries>
22+
<PlatformToolset>$(DefaultPlatformToolset)</PlatformToolset>
23+
<WholeProgramOptimization>true</WholeProgramOptimization>
24+
<CharacterSet>Unicode</CharacterSet>
25+
</PropertyGroup>
26+
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
27+
<ImportGroup Label="ExtensionSettings">
28+
</ImportGroup>
29+
<ImportGroup Label="Shared">
30+
</ImportGroup>
31+
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
32+
<Import Project="..\..\VC-LTL helper for Visual Studio.props" />
33+
</ImportGroup>
34+
<PropertyGroup Label="UserMacros" />
35+
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
36+
<LinkIncremental>false</LinkIncremental>
37+
<OutDir>$(SymbolsTestCppRootPathTmp)</OutDir>
38+
<IntDir>$(SymbolsTestCppRootPathTmp)</IntDir>
39+
</PropertyGroup>
40+
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
41+
<ClCompile>
42+
<WarningLevel>Level3</WarningLevel>
43+
<FunctionLevelLinking>true</FunctionLevelLinking>
44+
<IntrinsicFunctions>true</IntrinsicFunctions>
45+
<SDLCheck>true</SDLCheck>
46+
<PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
47+
<ConformanceMode>true</ConformanceMode>
48+
</ClCompile>
49+
<Link>
50+
<SubSystem>Console</SubSystem>
51+
<EnableCOMDATFolding>true</EnableCOMDATFolding>
52+
<OptimizeReferences>true</OptimizeReferences>
53+
<GenerateDebugInformation>true</GenerateDebugInformation>
54+
<NoEntryPoint>true</NoEntryPoint>
55+
</Link>
56+
</ItemDefinitionGroup>
57+
<ItemGroup>
58+
<ClInclude Include="resource.h" />
59+
</ItemGroup>
60+
<ItemGroup>
61+
<ResourceCompile Include="Resource.rc" />
62+
</ItemGroup>
63+
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
64+
<ImportGroup Label="ExtensionTargets">
65+
</ImportGroup>
66+
</Project>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3+
<ItemGroup>
4+
<Filter Include="头文件">
5+
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
6+
<Extensions>h;hh;hpp;hxx;h++;hm;inl;inc;ipp;xsd</Extensions>
7+
</Filter>
8+
<Filter Include="资源文件">
9+
<UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
10+
<Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions>
11+
</Filter>
12+
</ItemGroup>
13+
<ItemGroup>
14+
<ClInclude Include="resource.h">
15+
<Filter>头文件</Filter>
16+
</ClInclude>
17+
</ItemGroup>
18+
<ItemGroup>
19+
<ResourceCompile Include="Resource.rc">
20+
<Filter>资源文件</Filter>
21+
</ResourceCompile>
22+
</ItemGroup>
23+
</Project>

UnitTest/RCBuildTest/Resource.rc

+100
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,100 @@
1+
// Microsoft Visual C++ generated resource script.
2+
//
3+
#include "resource.h"
4+
5+
#define APSTUDIO_READONLY_SYMBOLS
6+
/////////////////////////////////////////////////////////////////////////////
7+
//
8+
// Generated from the TEXTINCLUDE 2 resource.
9+
//
10+
#include "winres.h"
11+
12+
/////////////////////////////////////////////////////////////////////////////
13+
#undef APSTUDIO_READONLY_SYMBOLS
14+
15+
/////////////////////////////////////////////////////////////////////////////
16+
// ����(���壬�й�) resources
17+
18+
#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_CHS)
19+
LANGUAGE LANG_CHINESE, SUBLANG_CHINESE_SIMPLIFIED
20+
#pragma code_page(936)
21+
22+
#ifdef APSTUDIO_INVOKED
23+
/////////////////////////////////////////////////////////////////////////////
24+
//
25+
// TEXTINCLUDE
26+
//
27+
28+
1 TEXTINCLUDE
29+
BEGIN
30+
"resource.h\0"
31+
END
32+
33+
2 TEXTINCLUDE
34+
BEGIN
35+
"#include ""winres.h""\r\n"
36+
"\0"
37+
END
38+
39+
3 TEXTINCLUDE
40+
BEGIN
41+
"\r\n"
42+
"\0"
43+
END
44+
45+
#endif // APSTUDIO_INVOKED
46+
47+
48+
/////////////////////////////////////////////////////////////////////////////
49+
//
50+
// Version
51+
//
52+
53+
VS_VERSION_INFO VERSIONINFO
54+
FILEVERSION 1,0,0,1
55+
PRODUCTVERSION 1,0,0,1
56+
FILEFLAGSMASK 0x3fL
57+
#ifdef _DEBUG
58+
FILEFLAGS 0x1L
59+
#else
60+
FILEFLAGS 0x0L
61+
#endif
62+
FILEOS 0x40004L
63+
FILETYPE 0x1L
64+
FILESUBTYPE 0x0L
65+
BEGIN
66+
BLOCK "StringFileInfo"
67+
BEGIN
68+
BLOCK "080404b0"
69+
BEGIN
70+
VALUE "CompanyName", "TODO: <��˾��>"
71+
VALUE "FileDescription", "TODO: <�ļ�˵��>"
72+
VALUE "FileVersion", "1.0.0.1"
73+
VALUE "InternalName", "RCBuildT.exe"
74+
VALUE "LegalCopyright", "Copyright (C) 2022"
75+
VALUE "OriginalFilename", "RCBuildT.exe"
76+
VALUE "ProductName", "TODO: <��Ʒ��>"
77+
VALUE "ProductVersion", "1.0.0.1"
78+
END
79+
END
80+
BLOCK "VarFileInfo"
81+
BEGIN
82+
VALUE "Translation", 0x804, 1200
83+
END
84+
END
85+
86+
#endif // ����(���壬�й�) resources
87+
/////////////////////////////////////////////////////////////////////////////
88+
89+
90+
91+
#ifndef APSTUDIO_INVOKED
92+
/////////////////////////////////////////////////////////////////////////////
93+
//
94+
// Generated from the TEXTINCLUDE 3 resource.
95+
//
96+
97+
98+
/////////////////////////////////////////////////////////////////////////////
99+
#endif // not APSTUDIO_INVOKED
100+

UnitTest/RCBuildTest/resource.h

+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
//{{NO_DEPENDENCIES}}
2+
// Microsoft Visual C++ generated include file.
3+
// Used by Resource.rc
4+
5+
// жÔÏóµÄÏÂÒ»×éĬÈÏÖµ
6+
//
7+
#ifdef APSTUDIO_INVOKED
8+
#ifndef APSTUDIO_READONLY_SYMBOLS
9+
#define _APS_NEXT_RESOURCE_VALUE 101
10+
#define _APS_NEXT_COMMAND_VALUE 40001
11+
#define _APS_NEXT_CONTROL_VALUE 1001
12+
#define _APS_NEXT_SYMED_VALUE 101
13+
#endif
14+
#endif
15+
16+
#include <vcruntime.h>
17+
#include <corecrt.h>
18+
19+
20+
#ifndef _LTL_ucrt_module_type
21+
#error VC-LTL not load!
22+
#endif

0 commit comments

Comments
 (0)