logo elektroda
logo elektroda
X
logo elektroda

Switching from Codeblocks to Visual Studio 2010 Ultimate: File Not Found Error

Ins0maniaC 10287 14
ADVERTISEMENT
Treść została przetłumaczona polish » english Zobacz oryginalną wersję tematu
  • #1 14476797
    Ins0maniaC
    Level 17  
    Hello. I`m switching from Codeblocks to Visual Studio. (2010). The university allows me to download the Ultimate version from dreamspark. Everything installed and I get the following error:
  • ADVERTISEMENT
  • Helpful post
    #2 14476884
    szelus
    Level 34  
    After all, you have a bull at the bottom that the compilation failed, so the program is gone...
    Paste the compilation log.
  • ADVERTISEMENT
  • #3 14477008
    Ins0maniaC
    Level 17  
    Meh, zapomniałem to dodać

    "Error 1 error LNK1123: failure during conversion to COFF: file invalid or corrupt c:\Users\Admin\documents\visual studio 2010\Projects\programpirwszy\programpirwszy\LINK
    "
  • ADVERTISEMENT
  • #4 14480841
    Ins0maniaC
    Level 17  
    Nobody knows what`s going on?
  • ADVERTISEMENT
  • Helpful post
    #5 14481127
    -psiak-
    Level 32  
    The error indicates that you have added a library that is not compatible with VS.
  • #6 14481279
    Ins0maniaC
    Level 17  
    I didn`t change anything in the installation settings. I didn`t add anything. Try reinstalling?
  • #7 14481362
    LED5W
    Level 34  
    Do you have VS2010 SP1?
  • Helpful post
    #8 14481538
    rufek90
    Level 25  
    Add something like this to the beginning of the file:

    Code: text
    Log in, to see the code
  • Helpful post
    #9 14481798
    LED5W
    Level 34  
    rufek90 wrote:
    Add something like this to the beginning of the file:

    Code: text
    Log in, to see the code
    So that it says it didn`t find it stdafx.h ? :|
  • Helpful post
    #10 14481848
    rufek90
    Level 25  
    I don`t program in C++, but the fact is that the program written by the author of the thread starts compiling for me after adding #include "stdafx.h". I use VS 2k10 prof.

    It is true that the error without #include "stdafx.h" is slightly different, because:

    error C1010: unexpected end of file while looking for precompiled header. Did you forget to add `#include "StdAfx.h"` to your source?


    here is my content of the stdafx.h file located in the "Header Files" folder of the win32 console application project. I did not add this file myself, it is created when creating the console application project :)

    Code: text
    Log in, to see the code



    Edit: Now I noticed that the author has these folders empty. Have you created a new win32 console application project? This is what it looks like for me:

    Switching from Codeblocks to Visual Studio 2010 Ultimate: File Not Found Error
  • Helpful post
    #11 14481920
    LED5W
    Level 34  
    rufek90 wrote:
    I don`t program in C++, but the fact is that the program written by the author of the thread starts compiling for me after adding #include "stdafx.h". I use VS 2k10 prof.

    It is true that the error without #include "stdafx.h" is slightly different, because:

    error C1010: unexpected end of file while looking for precompiled header. Did you forget to add `#include "StdAfx.h"` to your source?
    It`s completely different, and reported by the linker.

    rufek90 wrote:
    Edit: Now I noticed that the author has these folders empty. Have you created a new win32 console application project?
    Probably yes, but the empty project option was selected, or the creation of precompiled headers was deselected and the rest of the files were deleted. Anyway, the code is correct.
  • #13 14483143
    -psiak-
    Level 32  
    To me it looks like an argument with another compiler, e.g. Borland or GCC.
    I recommend uninstalling Visual and reinstalling it.
  • Helpful post
    #14 14483492
    LED5W
    Level 34  
    LED5W wrote:
    Do you have VS2010 SP1?
  • #15 14483582
    Ins0maniaC
    Level 17  
    This is the Ultimate version. No Service Pack 1.

    @Edit:

    As my colleague LED5W advised, installing Service Pack 1 helped.

Topic summary

The discussion revolves around a user transitioning from Codeblocks to Visual Studio 2010 Ultimate, encountering a "file not found" error during compilation. The error message indicates a failure during conversion to COFF, suggesting potential issues with library compatibility. Several responses highlight the importance of including the precompiled header file "stdafx.h" in the project, which resolves compilation issues. The user is advised to ensure that Visual Studio 2010 is updated with Service Pack 1, as this has been noted to resolve similar errors. The conversation also touches on the possibility of project settings being misconfigured, such as selecting an empty project or not enabling precompiled headers.
Summary generated by the language model.
ADVERTISEMENT