2023年7月3日发(作者:)
vs编译选项中的宏在配置vs项⽬是,你可以看到vs给你提供了⼀些宏(macros),如上图,但却找不到修改或添加宏的地⽅,在⽤google搜索之后,我发现vs内置的宏是不能修改的,现在就还剩下⼀个问题,可不可以添加新的宏?在webkit的⼯程中,你可以看到它添加了⼏个新的宏,如下图中最后⾯⼏个:它是在配置⽂件⾥⾯加的,怎么样在vs ide⾥⾯加这些宏我还不知道。下⾯就是C:/cygwin/home/xufan/WebKit/WebKitLibraries/win/tools/vsprops/s⾥⾯的内容,⼤家看⼀下加粗的部分就知道怎么加了:
下⾯是我在msdn找到的关于这些宏的解释():Visual C++ Concepts: Building a C/C++ ProgramMacros for Build Commands and PropertiesYou can use these macros anywhere in a project's Property Pages dialog box where strings are accepted. These macros arenot case
Description$(RemoteMachine)
Set to the value of the Remote Machine property on the Debug property page. See for more information.$(ConfigurationName)
The name of the current project configuration (for example, "Debug").$(PlatformName)
The name of current project platform (for example, "Win32").$(Inherit)
Specifies the order in which inherited properties appear in the command line composed by the project build system. Bydefault, inherited properties appear at the end of the current property.1$(NoInherit)
Causes any properties that would otherwise be inherited, to not be inherited. The use of $(NoInherit) causes anyoccurrences of$(Inherit) to be ignored for the same property.1$(ParentName)
Name of the item containing this project item. This will be the parent folder name, or project name.$(RootNameSpace)
The namespace, if any, containing the application.$(IntDir)
Path to the directory specified for intermediate files relative to the project directory. This resolves to the value for theIntermediate Directory property.$(OutDir)
Path to the output file directory, relative to the project directory. This resolves to the value for the Output Directoryproperty.$(DevEnvDir)
The installation directory of Visual Studio .NET (defined as drive + path); includes the trailing backslash '/'.$(InputDir)
The directory of the input file (defined as drive + path); includes the trailing backslash '/'. If the project is the input, then thismacro is equivalent to $(ProjectDir).$(InputPath)
The absolute path name of the input file (defined as drive + path + base name + file extension). If the project is the input,then this macro is equivalent to $(ProjectPath).$(InputName)
The base name of the input file. If the project is the input, then this macro is equivalent to $(ProjectName).$(InputFileName)
The file name of the input file (defined as base name + file extension). If the project is the input, then this macro isequivalent to $(ProjectFileName).$(InputExt)
The file extension of the input file. It includes the '.' before the file extension. If the project is the input, then this macro isequivalent to $(ProjectExt).$(ProjectDir)
The directory of the project (defined as drive + path); includes the trailing backslash '/'.$(ProjectPath)
The absolute path name of the project (defined as drive + path + base name + file extension).$(ProjectName)
The base name of the project.$(ProjectFileName)
The file name of the project (defined as base name + file extension).$(ProjectExt)
The file extension of the project. It includes the '.' before the file extension.$(SolutionDir)
The directory of the solution (defined as drive + path); includes the trailing backslash '/'.$(SolutionPath)
The absolute path name of the solution (defined as drive + path + base name + file extension).$(SolutionName)
The base name of the solution.$(SolutionFileName)
The file name of the solution (defined as base name + file extension).$(SolutionExt)
The file extension of the solution. It includes the '.' before the file extension.$(TargetDir)
The directory of the primary output file for the build (defined as drive + path); includes the trailing backslash '/'.$(TargetPath)
The absolute path name of the primary output file for the build (defined as drive + path + base name + file extension).$(TargetName)
The base name of the primary output file for the build.$(TargetFileName)
The file name of the primary output file for the build (defined as base name + file extension).$(TargetExt)
The file extension of the primary output file for the build. It includes the '.' before the file extension.$(VSInstallDir)
The directory into which you installed Visual Studio .NET.$(VCInstallDir)
The directory into which you installed Visual C++ .NET.$(FrameworkDir)
The directory into which the .NET Framework was installed.$(FrameworkVersion)
The version of the .NET Framework used by Visual Studio. Combined with $(FrameworkDir), the full path to the version ofthe .NET Framework use by Visual Studio.$(FrameworkSDKDir)
The directory into which you installed the .NET Framework SDK. The .NET Framework SDK could have been installed as partof Visual Studio .NET or separately.$(WebDeployPath)
The relative path from the web deployment root to where the project outputs belong. Returns the same value as .$(WebDeployRoot)
The absolute path to the location of . For example, c:/inetpub/wwwroot.$(SafeParentName)
The name of the immediate parent in valid name format. For example, a form is the parent of a .resx file.$(SafeInputName)
The name of the file as a valid class name, minus file extension.1. Use the for the property to see how properties are inherited. See for more information on property inheritance. See forusage Also
发布者:admin,转转请注明出处:http://www.yc00.com/news/1688384452a130002.html
评论列表(0条)