Skip to content

Commit

Permalink
解决Bug 29,RC文件中引用VC-LTL编译失败(#29
Browse files Browse the repository at this point in the history
  • Loading branch information
mingkuang-Chuyu committed Mar 18, 2022
1 parent 2083ae3 commit 584822f
Show file tree
Hide file tree
Showing 13 changed files with 325 additions and 18 deletions.
6 changes: 3 additions & 3 deletions TargetPlatform/10.0.10240.0/header/vcruntime.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,17 @@
#include "..\..\header\VC_LTL_Config.h"

#ifndef _LTL_vcruntime_module_type
#define _LTL_vcruntime_module_type _LTL_vcruntime_module_type_from_ucrtbase
#define _LTL_vcruntime_module_type 2/*_LTL_vcruntime_module_type_from_ucrtbase*/
#endif


#ifndef _LTL_ucrt_module_type
#define _LTL_ucrt_module_type _LTL_ucrt_module_type_from_ucrtbase
#define _LTL_ucrt_module_type 0/*_LTL_ucrt_module_type_from_ucrtbase*/
#endif


#ifndef _LTL_vccorlib_module_type
#define _LTL_vccorlib_module_type _LTL_vccorlib_module_type_form_wincorlib
#define _LTL_vccorlib_module_type 1/*_LTL_vccorlib_module_type_form_wincorlib*/
#endif

#include <..\include\vcruntime.h>
6 changes: 3 additions & 3 deletions TargetPlatform/10.0.19041.0/header/vcruntime.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,17 @@
#include "..\..\header\VC_LTL_Config.h"

#ifndef _LTL_vcruntime_module_type
#define _LTL_vcruntime_module_type _LTL_vcruntime_module_type_from_ucrtbase
#define _LTL_vcruntime_module_type 2/*_LTL_vcruntime_module_type_from_ucrtbase*/
#endif


#ifndef _LTL_ucrt_module_type
#define _LTL_ucrt_module_type _LTL_ucrt_module_type_from_ucrtbase
#define _LTL_ucrt_module_type 0/*_LTL_ucrt_module_type_from_ucrtbase*/
#endif


#ifndef _LTL_vccorlib_module_type
#define _LTL_vccorlib_module_type _LTL_vccorlib_module_type_form_wincorlib
#define _LTL_vccorlib_module_type 1/*_LTL_vccorlib_module_type_form_wincorlib*/
#endif

#include <..\include\vcruntime.h>
6 changes: 3 additions & 3 deletions TargetPlatform/5.1.2600.0/header/vcruntime.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,17 @@
#include "..\..\header\VC_LTL_Config.h"

#ifndef _LTL_vcruntime_module_type
#define _LTL_vcruntime_module_type _LTL_vcruntime_module_type_from_msvcrt
#define _LTL_vcruntime_module_type 1/*_LTL_vcruntime_module_type_from_msvcrt*/
#endif


#ifndef _LTL_ucrt_module_type
#define _LTL_ucrt_module_type _LTL_ucrt_module_type_from_msvcrt
#define _LTL_ucrt_module_type 1/*_LTL_ucrt_module_type_from_msvcrt*/
#endif


#ifndef _LTL_vccorlib_module_type
#define _LTL_vccorlib_module_type _LTL_vccorlib_module_type_form_vccorlib140
#define _LTL_vccorlib_module_type 0/*_LTL_vccorlib_module_type_form_vccorlib140*/
#endif

#include <..\include\vcruntime.h>
6 changes: 3 additions & 3 deletions TargetPlatform/5.2.3790.0/header/vcruntime.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,17 @@
#include "..\..\header\VC_LTL_Config.h"

#ifndef _LTL_vcruntime_module_type
#define _LTL_vcruntime_module_type _LTL_vcruntime_module_type_from_msvcrt
#define _LTL_vcruntime_module_type 1/*_LTL_vcruntime_module_type_from_msvcrt*/
#endif


#ifndef _LTL_ucrt_module_type
#define _LTL_ucrt_module_type _LTL_ucrt_module_type_from_msvcrt
#define _LTL_ucrt_module_type 1/*_LTL_ucrt_module_type_from_msvcrt*/
#endif


#ifndef _LTL_vccorlib_module_type
#define _LTL_vccorlib_module_type _LTL_vccorlib_module_type_form_vccorlib140
#define _LTL_vccorlib_module_type 0/*_LTL_vccorlib_module_type_form_vccorlib140*/
#endif

#include <..\include\vcruntime.h>
6 changes: 3 additions & 3 deletions TargetPlatform/6.0.6000.0/header/vcruntime.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,17 @@
#include "..\..\header\VC_LTL_Config.h"

#ifndef _LTL_vcruntime_module_type
#define _LTL_vcruntime_module_type _LTL_vcruntime_module_type_from_msvcrt
#define _LTL_vcruntime_module_type 1/*_LTL_vcruntime_module_type_from_msvcrt*/
#endif


#ifndef _LTL_ucrt_module_type
#define _LTL_ucrt_module_type _LTL_ucrt_module_type_from_msvcrt
#define _LTL_ucrt_module_type 1/*_LTL_ucrt_module_type_from_msvcrt*/
#endif


#ifndef _LTL_vccorlib_module_type
#define _LTL_vccorlib_module_type _LTL_vccorlib_module_type_form_vccorlib140
#define _LTL_vccorlib_module_type 0/*_LTL_vccorlib_module_type_form_vccorlib140*/
#endif

#include <..\include\vcruntime.h>
6 changes: 3 additions & 3 deletions TargetPlatform/6.2.9200.0/header/vcruntime.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,17 @@
#include "..\..\header\VC_LTL_Config.h"

#ifndef _LTL_vcruntime_module_type
#define _LTL_vcruntime_module_type _LTL_vcruntime_module_type_from_msvcrt
#define _LTL_vcruntime_module_type 1/*_LTL_vcruntime_module_type_from_msvcrt*/
#endif


#ifndef _LTL_ucrt_module_type
#define _LTL_ucrt_module_type _LTL_ucrt_module_type_from_msvcrt
#define _LTL_ucrt_module_type 1/*_LTL_ucrt_module_type_from_msvcrt*/
#endif


#ifndef _LTL_vccorlib_module_type
#define _LTL_vccorlib_module_type _LTL_vccorlib_module_type_form_wincorlib
#define _LTL_vccorlib_module_type 1/*_LTL_vccorlib_module_type_form_wincorlib*/
#endif

#include <..\include\vcruntime.h>
66 changes: 66 additions & 0 deletions UnitTest/RCBuildTest/RCBuildTest.vcxproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Release|Win32">
<Configuration>Release</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
</ItemGroup>
<PropertyGroup Label="Globals">
<VCProjectVersion>16.0</VCProjectVersion>
<Keyword>Win32Proj</Keyword>
<ProjectGuid>{d0002e52-94f3-458c-b135-16502fee1a3f}</ProjectGuid>
<RootNamespace>RCBuildTest</RootNamespace>
<WindowsTargetPlatformVersion>$([Microsoft.Build.Utilities.ToolLocationHelper]::GetLatestSDKTargetPlatformVersion('Windows', '10.0'))</WindowsTargetPlatformVersion>
<SymbolsTestCppRootPathTmp>$(SymbolsTestCppRootPath)</SymbolsTestCppRootPathTmp>
<SymbolsTestCppRootPathTmp Condition="'$(SymbolsTestCppRootPathTmp)' == ''">$(Platform)\$(Configuration)\</SymbolsTestCppRootPathTmp>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>$(DefaultPlatformToolset)</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
<ImportGroup Label="Shared">
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<Import Project="..\..\VC-LTL helper for Visual Studio.props" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<LinkIncremental>false</LinkIncremental>
<OutDir>$(SymbolsTestCppRootPathTmp)</OutDir>
<IntDir>$(SymbolsTestCppRootPathTmp)</IntDir>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<SDLCheck>true</SDLCheck>
<PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ConformanceMode>true</ConformanceMode>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
<GenerateDebugInformation>true</GenerateDebugInformation>
<NoEntryPoint>true</NoEntryPoint>
</Link>
</ItemDefinitionGroup>
<ItemGroup>
<ClInclude Include="resource.h" />
</ItemGroup>
<ItemGroup>
<ResourceCompile Include="Resource.rc" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>
23 changes: 23 additions & 0 deletions UnitTest/RCBuildTest/RCBuildTest.vcxproj.filters
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<Filter Include="头文件">
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
<Extensions>h;hh;hpp;hxx;h++;hm;inl;inc;ipp;xsd</Extensions>
</Filter>
<Filter Include="资源文件">
<UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
<Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions>
</Filter>
</ItemGroup>
<ItemGroup>
<ClInclude Include="resource.h">
<Filter>头文件</Filter>
</ClInclude>
</ItemGroup>
<ItemGroup>
<ResourceCompile Include="Resource.rc">
<Filter>资源文件</Filter>
</ResourceCompile>
</ItemGroup>
</Project>
100 changes: 100 additions & 0 deletions UnitTest/RCBuildTest/Resource.rc
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
// Microsoft Visual C++ generated resource script.
//
#include "resource.h"

#define APSTUDIO_READONLY_SYMBOLS
/////////////////////////////////////////////////////////////////////////////
//
// Generated from the TEXTINCLUDE 2 resource.
//
#include "winres.h"

/////////////////////////////////////////////////////////////////////////////
#undef APSTUDIO_READONLY_SYMBOLS

/////////////////////////////////////////////////////////////////////////////
// ����(���壬�й�) resources

#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_CHS)
LANGUAGE LANG_CHINESE, SUBLANG_CHINESE_SIMPLIFIED
#pragma code_page(936)

#ifdef APSTUDIO_INVOKED
/////////////////////////////////////////////////////////////////////////////
//
// TEXTINCLUDE
//

1 TEXTINCLUDE
BEGIN
"resource.h\0"
END

2 TEXTINCLUDE
BEGIN
"#include ""winres.h""\r\n"
"\0"
END

3 TEXTINCLUDE
BEGIN
"\r\n"
"\0"
END

#endif // APSTUDIO_INVOKED


/////////////////////////////////////////////////////////////////////////////
//
// Version
//

VS_VERSION_INFO VERSIONINFO
FILEVERSION 1,0,0,1
PRODUCTVERSION 1,0,0,1
FILEFLAGSMASK 0x3fL
#ifdef _DEBUG
FILEFLAGS 0x1L
#else
FILEFLAGS 0x0L
#endif
FILEOS 0x40004L
FILETYPE 0x1L
FILESUBTYPE 0x0L
BEGIN
BLOCK "StringFileInfo"
BEGIN
BLOCK "080404b0"
BEGIN
VALUE "CompanyName", "TODO: <��˾��>"
VALUE "FileDescription", "TODO: <�ļ�˵��>"
VALUE "FileVersion", "1.0.0.1"
VALUE "InternalName", "RCBuildT.exe"
VALUE "LegalCopyright", "Copyright (C) 2022"
VALUE "OriginalFilename", "RCBuildT.exe"
VALUE "ProductName", "TODO: <��Ʒ��>"
VALUE "ProductVersion", "1.0.0.1"
END
END
BLOCK "VarFileInfo"
BEGIN
VALUE "Translation", 0x804, 1200
END
END

#endif // ����(���壬�й�) resources
/////////////////////////////////////////////////////////////////////////////



#ifndef APSTUDIO_INVOKED
/////////////////////////////////////////////////////////////////////////////
//
// Generated from the TEXTINCLUDE 3 resource.
//


/////////////////////////////////////////////////////////////////////////////
#endif // not APSTUDIO_INVOKED

22 changes: 22 additions & 0 deletions UnitTest/RCBuildTest/resource.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
//{{NO_DEPENDENCIES}}
// Microsoft Visual C++ generated include file.
// Used by Resource.rc

// жÔÏóµÄÏÂÒ»×éĬÈÏÖµ
//
#ifdef APSTUDIO_INVOKED
#ifndef APSTUDIO_READONLY_SYMBOLS
#define _APS_NEXT_RESOURCE_VALUE 101
#define _APS_NEXT_COMMAND_VALUE 40001
#define _APS_NEXT_CONTROL_VALUE 1001
#define _APS_NEXT_SYMED_VALUE 101
#endif
#endif

#include <vcruntime.h>
#include <corecrt.h>


#ifndef _LTL_ucrt_module_type
#error VC-LTL not load!
#endif
Loading

0 comments on commit 584822f

Please sign in to comment.