Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/actionscript-3/6.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
c++;stl_u_declspec(noreturn)无效编译错误 < >我编译本地C++(在VS2008 SP1)时有编译错误。_C++_Visual Studio_Stl - Fatal编程技术网

c++;stl_u_declspec(noreturn)无效编译错误 < >我编译本地C++(在VS2008 SP1)时有编译错误。

c++;stl_u_declspec(noreturn)无效编译错误 < >我编译本地C++(在VS2008 SP1)时有编译错误。,c++,visual-studio,stl,C++,Visual Studio,Stl,错误是: error C2062: type 'void' unexpected c:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\include\functional “功能”中的行是: 奇怪的是,在我安装VS2008团队资源管理器之前,这个错误从未发生过 在VC++2010中编译时,我还注意到一个类似的问题: C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\

错误是:

error C2062: type 'void' unexpected        c:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\include\functional
“功能”中的行是:

奇怪的是,在我安装VS2008团队资源管理器之前,这个错误从未发生过

在VC++2010中编译时,我还注意到一个类似的问题:

C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\vector(1425): error C2062: type 'void' unexpected.
“矢量”中的行是:

你知道微软是否改变了一些语法规则吗。 我在vcproj属性上玩了很多,但一点帮助都没有

谢谢大家!

My.vcproj文件(根据要求):



尝试将declspec放在纯CRTIMP2之前,而不是之后。就是这样。

发布.vcproj文件的内容。创建最小复制。如果在一个10行或更少的文件中(没有
#include
)不能得到相同的错误,则可能在某些头文件中有一个恶意宏,影响深远。Larry,感谢您的快速响应。我想我不想搞乱STL包含文件。。。
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\vector(1425): error C2062: type 'void' unexpected.
__declspec(noreturn) void _Xlen() const
<?xml version="1.0" encoding="windows-1255"?>
<VisualStudioProject
    ProjectType="Visual C++"
    Version="9.00"
    Name="ProjectNamespace"
    ProjectGUID="{C5FA75AB-0476-46A5-AAF6-1A7D03E90763}"
    RootNamespace="ProjectName"
    SccProjectName="SAK"
    SccAuxPath="SAK"
    SccLocalPath="SAK"
    SccProvider="SAK"
    Keyword="ManagedCProj"
    TargetFrameworkVersion="196613"
    >
    <Platforms>
        <Platform
            Name="Win32"
        />
    </Platforms>
    <ToolFiles>
    </ToolFiles>
    <Configurations>
        <Configuration
            Name="Debug|Win32"
            OutputDirectory=".\Debug"
            IntermediateDirectory=".\Debug"
            ConfigurationType="2"
            InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC60.vsprops"
            UseOfMFC="1"
            CharacterSet="1"
            ManagedExtensions="0"
            >
            <Tool
                Name="VCPreBuildEventTool"
            />
            <Tool
                Name="VCCustomBuildTool"
            />
            <Tool
                Name="VCXMLDataGeneratorTool"
            />
            <Tool
                Name="VCWebServiceProxyGeneratorTool"
            />
            <Tool
                Name="VCMIDLTool"
            />
            <Tool
                Name="VCCLCompilerTool"
                Optimization="0"
                AdditionalIncludeDirectories=""
                PreprocessorDefinitions="WIN32;_DEBUG;_USRDLL;ProjectName_EXPORTS;_USE_32BIT_TIME_T"
                MinimalRebuild="false"
                ExceptionHandling="1"
                BasicRuntimeChecks="3"
                RuntimeLibrary="1"
                UsePrecompiledHeader="1"
                PrecompiledHeaderFile=".\Debug/ProjectName.pch"
                AssemblerListingLocation=".\Debug/"
                ObjectFile=".\Debug/"
                ProgramDataBaseFileName=".\Debug/"
                WarningLevel="3"
                SuppressStartupBanner="true"
                DebugInformationFormat="4"
            />
            <Tool
                Name="VCManagedResourceCompilerTool"
            />
            <Tool
                Name="VCResourceCompilerTool"
            />
            <Tool
                Name="VCPreLinkEventTool"
            />
            <Tool
                Name="VCLinkerTool"
                IgnoreImportLibrary="false"
                AdditionalDependencies="ws2_32.lib Mswsock.lib Advapi32.lib"
                OutputFile="Debug\ProjectName.dll"
                LinkIncremental="2"
                SuppressStartupBanner="true"
                AdditionalLibraryDirectories=""
                ManifestFile="$(IntDir)\$(TargetFileName).intermediate.manifest"
                IgnoreAllDefaultLibraries="false"
                ModuleDefinitionFile=".\ProjectName.def"
                GenerateDebugInformation="true"
                AssemblyDebug="0"
                ProgramDatabaseFile=".\Debug/ProjectName.pdb"
                RandomizedBaseAddress="1"
                FixedBaseAddress="0"
                DataExecutionPrevention="0"
                ImportLibrary=".\Debug/ProjectName.lib"
                TargetMachine="1"
            />
            <Tool
                Name="VCALinkTool"
            />
            <Tool
                Name="VCManifestTool"
            />
            <Tool
                Name="VCXDCMakeTool"
            />
            <Tool
                Name="VCBscMakeTool"
            />
            <Tool
                Name="VCFxCopTool"
            />
            <Tool
                Name="VCAppVerifierTool"
            />
            <Tool
                Name="VCPostBuildEventTool"
            />
        </Configuration>
        <Configuration
            Name="Release|Win32"
            OutputDirectory="$(ConfigurationName)"
            IntermediateDirectory="$(ConfigurationName)"
            ConfigurationType="2"
            CharacterSet="0"
            ManagedExtensions="0"
            WholeProgramOptimization="1"
            >
            <Tool
                Name="VCPreBuildEventTool"
            />
            <Tool
                Name="VCCustomBuildTool"
            />
            <Tool
                Name="VCXMLDataGeneratorTool"
            />
            <Tool
                Name="VCWebServiceProxyGeneratorTool"
            />
            <Tool
                Name="VCMIDLTool"
            />
            <Tool
                Name="VCCLCompilerTool"
                PreprocessorDefinitions="WIN32;NDEBUG;_USE_32BIT_TIME_T"
                ExceptionHandling="0"
                RuntimeLibrary="2"
                UsePrecompiledHeader="2"
                WarningLevel="3"
                DebugInformationFormat="3"
            />
            <Tool
                Name="VCManagedResourceCompilerTool"
            />
            <Tool
                Name="VCResourceCompilerTool"
            />
            <Tool
                Name="VCPreLinkEventTool"
            />
            <Tool
                Name="VCLinkerTool"
                AdditionalDependencies="ws2_32.lib Mswsock.lib Advapi32.lib"
                LinkIncremental="1"
                ModuleDefinitionFile=".\ProjectName.def"
                GenerateDebugInformation="true"
                TargetMachine="1"
            />
            <Tool
                Name="VCALinkTool"
            />
            <Tool
                Name="VCManifestTool"
            />
            <Tool
                Name="VCXDCMakeTool"
            />
            <Tool
                Name="VCBscMakeTool"
            />
            <Tool
                Name="VCFxCopTool"
            />
            <Tool
                Name="VCAppVerifierTool"
            />
            <Tool
                Name="VCPostBuildEventTool"
            />
        </Configuration>
    </Configurations>
    <References>
        <AssemblyReference
            RelativePath="System.dll"
            AssemblyName="System, Version=2.0.0.0, PublicKeyToken=b77a5c561934e089, processorArchitecture=MSIL"
            MinFrameworkVersion="131072"
        />
        <AssemblyReference
            RelativePath="System.Data.dll"
            AssemblyName="System.Data, Version=2.0.0.0, PublicKeyToken=b77a5c561934e089, processorArchitecture=x86"
            MinFrameworkVersion="131072"
        />
        <AssemblyReference
            RelativePath="System.XML.dll"
            AssemblyName="System.Xml, Version=2.0.0.0, PublicKeyToken=b77a5c561934e089, processorArchitecture=MSIL"
            MinFrameworkVersion="131072"
        />
    </References>
    <Files>
        <Filter
            Name="Source Files"
            Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
            UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
            >
            <File
                RelativePath=".\common.cpp"
                >
            </File>
            <File
                RelativePath=".\ProjectName.cpp"
                >
            </File>
            <File
                RelativePath=".\ProjectName.def"
                >
            </File>
            <File
                RelativePath=".\MessageCracker.cpp"
                >
            </File>
            <File
                RelativePath=".\PlaceTradeManager.cpp"
                >
            </File>
            <File
                RelativePath=".\RequestsManager.cpp"
                >
            </File>
            <File
                RelativePath=".\Stdafx.cpp"
                >
                <FileConfiguration
                    Name="Debug|Win32"
                    >
                    <Tool
                        Name="VCCLCompilerTool"
                        UsePrecompiledHeader="1"
                    />
                </FileConfiguration>
                <FileConfiguration
                    Name="Release|Win32"
                    >
                    <Tool
                        Name="VCCLCompilerTool"
                        UsePrecompiledHeader="1"
                    />
                </FileConfiguration>
            </File>
            <File
                RelativePath=".\TCPClient.cpp"
                >
            </File>
            <Filter
                Name="config"
                >
                <File
                    RelativePath=".\config\Configuration.cpp"
                    >
                </File>
                <File
                    RelativePath=".\config\stringfile.cpp"
                    >
                </File>
            </Filter>
        </Filter>
        <Filter
            Name="Header Files"
            Filter="h;hpp;hxx;hm;inl;inc;xsd"
            UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
            >
            <File
                RelativePath=".\common.h"
                >
            </File>
            <File
                RelativePath=".\ProjectName.h"
                >
            </File>
            <File
                RelativePath=".\MessageCracker.h"
                >
            </File>
            <File
                RelativePath=".\Messages.h"
                >
            </File>
            <File
                RelativePath=".\Include1.h"
                >
            </File>
            <File
                RelativePath=".\Include2.h"
                >
            </File>
            <File
                RelativePath=".\resource.h"
                >
            </File>
            <File
                RelativePath=".\Stdafx.h"
                >
            </File>
            <File
                RelativePath=".\Sync.h"
                >
            </File>
            <File
                RelativePath=".\TCPClient.h"
                >
            </File>
            <Filter
                Name="config"
                >
                <File
                    RelativePath=".\config\Configuration.h"
                    >
                </File>
                <File
                    RelativePath=".\config\stringfile.h"
                    >
                </File>
            </Filter>
        </Filter>
        <Filter
            Name="Resource Files"
            Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav"
            UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
            >
            <File
                RelativePath=".\app.ico"
                >
            </File>
        </Filter>
    </Files>
    <Globals>
    </Globals>
</VisualStudioProject>