我无法在visual studio中找到构建错误?

时间:2015-07-14 07:16:03

标签: c visual-studio-2010

有一些构建错误,我没有得到。 首先它要求放置scanf_s而不是scanf然后再次构建错误

    #include<stdio.h>

    void main()
    {
    float d,u,a,t;
    printf("\nEnter the accelaration(m/sec sq):  ");
    scanf_s("%f",&a);
    printf("Enter the time(s): ");
    scanf_s("%f",&t);
    printf("Enter the initial velocity:  ");
    scanf_s("%f",&u);
    d=a*t+(u*t*t)/2;
    printf("The distance covered is %f mtrs  ",d);



}




/* 1>------ Build started: Project: small progarm, Configuration: Debug   Win32 ------
1>Build started 14-Jul-15 12:01:32 PM.
1>InitializeBuildStatus:
1>  Touching "Debug\small progarm.unsuccessfulbuild".  
1>ClCompile:
1>  small practice programs.cpp
1>ManifestResourceCompile:
1>  All outputs are up-to-date.
1>LINK : fatal error LNK1123: failure during conversion to COFF: file   invalid or corrupt
1>
1>Build FAILED.
1>
1>Time Elapsed 00:00:00.49
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
*/

1 个答案:

答案 0 :(得分:1)

尝试从Microsoft阅读本文 -

https://support.microsoft.com/en-us/kb/2757355

它声明 -

原因:此问题是由msvcr100_clr0400.dll上的cvtres.exe依赖性失败引起的,该错误随Visual Studio 2010 RTM一起提供,并最终在Visual Studio 2012 RTM或更新时使用新版本进行更新。安装了.NET Framework 4.5。

解决方法:要解决此链接错误,请将Visual Studio 2010 RTM升级到VS 2010 SP1。升级到VS 2010 SP1可解决依赖性故障,并且VC ++ 2010项目构建时不会出现LNK1123错误。