none
c1xx : fatal error C1083: Cannot open source file?

    Question

  • Hi there,

    I'm having this problem when trying to compile a code file. I made a simple testing code and tried to compile it using C++ Visual Studio Command Prompt, but it came up with the error message:

    'c1xx : fatal error C1083 Cannot open source or file : No such file or directory.'

    I checked to see if the file was in the C:\Windows\system 32 file directory and it was, so I tried saving it normally in my 'John' file and it's coming up with the same message. I'm using Windows 7 Home Premium on my computer and I was just wondering how I can solve this problem.

    Thank you in advance,

    John Holland.

    Friday, July 23, 2010 1:04 PM

Answers

  • Ok, I'm saving it in a file in My Documents, but how do you change the C:\Windows\system32> on the Visual Studio Command Prompt?


    The Visual Studio Command prompt is an ordinary Windows command prompt with the environment set up to run Visual Studio commands conveniently.

    The 'cd' command is how you can change the working directory, e.g.

    cd "\users\john\My Documents"

    Answering policy: see profile.
    Monday, July 26, 2010 9:17 AM

All replies

  • Please post the command line you are using which produces the compilation error.

    Incidentally, you should not be putting any of your files in C:\Windows\system32.


    Answering policy: see profile.
    Friday, July 23, 2010 1:13 PM
  • Please post the command line you are using which produces the compilation error.

    Incidentally, you should not be putting any of your files in C:\Windows\system32.


    Answering policy: see profile.


    C:\Windows\system32>cl /EHsc basic.cpp

    Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.30319.01 for 80x86

    Copyright (C) Microsoft Corperation. All rights reserved.

    basic.cpp

    c1xx : fatal error C1083: Cannot open source file: 'basic.cpp' : no such file or directory

     

    If that's the case where should I put the files in future and how do I change the path, please?

    Many thanks,

    John.

    Sunday, July 25, 2010 7:51 PM
  • Hi John,

    C:\windows\system32 is a system folder. It is not recommended to save any user document in this folder.

    We suggest you copy and paste the file “basic.cpp” to other non-system folder, for example: documents or some new folder in Driver D, etc.

    Cheers,

    Yi


    Please remember to mark the replies as answers if they help and unmark them if they provide no help.
    Welcome to the All-In-One Code Framework! If you have any feedback, please tell us.
    Monday, July 26, 2010 8:15 AM
  • Hi John,

    C:\windows\system32 is a system folder. It is not recommended to save any user document in this folder.

    We suggest you copy and paste the file “basic.cpp” to other non-system folder, for example: documents or some new folder in Driver D, etc.

    Cheers,

    Yi


    Please remember to mark the replies as answers if they help and unmark them if they provide no help.
    Welcome to the All-In-One Code Framework! If you have any feedback, please tell us.


    Ok, I'm saving it in a file in My Documents, but how do you change the C:\Windows\system32> on the Visual Studio Command Prompt?

    Many thanks,

    John.

    Monday, July 26, 2010 9:02 AM
  • Ok, I'm saving it in a file in My Documents, but how do you change the C:\Windows\system32> on the Visual Studio Command Prompt?


    The Visual Studio Command prompt is an ordinary Windows command prompt with the environment set up to run Visual Studio commands conveniently.

    The 'cd' command is how you can change the working directory, e.g.

    cd "\users\john\My Documents"

    Answering policy: see profile.
    Monday, July 26, 2010 9:17 AM
  • Thank you for all your help. It works at last!

    Many thanks,

    John.

    Monday, July 26, 2010 9:22 AM
  • hi John,
    how did u solve this error? Would be helpful if u share.
    Friday, December 14, 2012 4:33 PM