none
C1083 Permission denied

    Question

  • Hi,

    I'm getting this C1083 Permission denied error when I try to build an application (console type) project A which includes files from another project B (static library type). The B project includes files from a math library C (GSL). When I build the static library B, I have no problems. The problem is when I try to build A, and it complains about having permission denied to access a folder which turns to be the folder containing the .h files of C (included by B).

    I hope this is clear enough, if not please tell me.

    I'm using XP Home Edition and files have no permissions at all.

    Here is the text:

    1>c1xx : fatal error C1083: Cannot open source file: 'C:\Documents and Settings\Alix\My Documents\genetic context\GSL\include': Permission denied

    I was having the same error with visual studio 2003, then I upgraded to visual studio 2005 Express and I still have the same error.

    I am not using the .Net framework.

    Thanks in advance,

         Alix.

     

    Tuesday, April 04, 2006 7:02 PM

Answers

  • Okay that looks alright. Your error message :-

    1>c1xx : fatal error C1083: Cannot open source file: 'C:\Documents and Settings\Alix\My Documents\genetic context\GSL\include': Permission denied

    That gives me the feeling that you are logged in as some other user (and not as Alix) and thus those directories are inaccessible to you. Is this the case?

    Wednesday, April 05, 2006 5:00 PM
  • To check the permissions in Home Edition, you may have to restart in Safe Mode (or use the cacls tool if you know command line).
    Wednesday, April 05, 2006 6:47 PM

All replies

  • Could you show your #include line?

     Alix wrote:

    Hi,

    I'm getting this C1083 Permission denied error when I try to build an application (console type) project A which includes files from another project B (static library type). The B project includes files from a math library C (GSL). When I build the static library B, I have no problems. The problem is when I try to build A, and it complains about having permission denied to access a folder which turns to be the folder containing the .h files of C (included by B).

    I hope this is clear enough, if not please tell me.

    I'm using XP Home Edition and files have no permissions at all.

    Here is the text:

    1>c1xx : fatal error C1083: Cannot open source file: 'C:\Documents and Settings\Alix\My Documents\genetic context\GSL\include': Permission denied

    I was having the same error with visual studio 2003, then I upgraded to visual studio 2005 Express and I still have the same error.

    I am not using the .Net framework.

    Thanks in advance,

         Alix.

     

    Tuesday, April 04, 2006 7:27 PM
  • In one of the .h files of B, I have :

    #include "gsl/gsl_sf_gamma.h"

    #include "gsl/gsl_math.h"

    Thanks.

     

    Wednesday, April 05, 2006 4:30 PM
  • Okay that looks alright. Your error message :-

    1>c1xx : fatal error C1083: Cannot open source file: 'C:\Documents and Settings\Alix\My Documents\genetic context\GSL\include': Permission denied

    That gives me the feeling that you are logged in as some other user (and not as Alix) and thus those directories are inaccessible to you. Is this the case?

    Wednesday, April 05, 2006 5:00 PM
  • To check the permissions in Home Edition, you may have to restart in Safe Mode (or use the cacls tool if you know command line).
    Wednesday, April 05, 2006 6:47 PM
  • It is not the case. Alix is the only user besides other special users like Guest and SQLDebugger and I am using the user Alix.

    Thanks.
    Wednesday, April 05, 2006 6:52 PM
  • Here is the output of cacls :
    C:\Documents and Settings\Alix>cacls "My Documents\genetic context\GSL\include"
    C:\Documents and Settings\Alix\My Documents\genetic context\GSL\include PC240882351225\Alix:F
                                                                            PC240882351225\Alix:(OI)(CI)(IO)F
                                                                            NT AUTHORITY\SYSTEM:F
                                                                            NT AUTHORITY\SYSTEM:(OI)(CI)(IO)F
                                                                            BUILTIN\Administrators:F
                                                                            BUILTIN\Administrators:(OI)(CI)(IO)F

    What does it mean?
    Wednesday, April 05, 2006 6:56 PM
  • I am having the same problem. I am using Qt with Visual Studio .net and I am including some .h files. I entered the include path and when building it tells me :

    fatal error C1083: Include-Datei kann nicht geöffnet werden: 'c:\Qt\4.1.2\include\': Permission denied

    Any ideas?
    Sunday, April 16, 2006 1:53 PM
  • I've gotten things this when I use cygwin, particularly tar.exe and scp.exe.

    Try making a copy of the include file (use xcopy or do it in the Windows Explorer), and then replacing the original.

    Brian

     

    Tuesday, April 18, 2006 2:00 PM
  • This seems to be a compiler problem.

    I get this too and so do others in the QT community.
    this is what i get:
    c1xx : fatal error C1083: Cannot open source file: 'C:\Qt\3.3.5/include': Permission denied

    we do work with cygwin (and cygwin/bin) is in the path.
    There is no problem with the include files of QT  so copying them around doesn't help.
    The only workaround for vs8 bug here is, what we call "voodoo magic", do something else and come back to it and it will probably compile again on the 2nd or third tries.

    Unfortunatly, my team and I receive this error at least 20-30 times a day, which makes it hard to work with vs8.
    vs6 has no problems.
    we usually just focus out to some other window on the system and then re-focus back on dev studio and try to compile again and then it works (not always though).

    I wish MS fix this bug - i am willing to help with any diagnostics program and it's output.
    I tried with sysinternals filemon to catch the problem but when i focus out to run filemon and then comeback it doesn't happen.

    It looks like some clash between threads in dev studio trying to access the same file simultaniously with exclusive access. but this is just a guess.

    I am posting a link to this problem on the qt forum too:
    http://www.qtcentre.org/forum/f-qt-programming-2/t-qt-and-visual-studio-2005-include-problems-false-permission-denied-3433.html


    Sunday, August 27, 2006 8:25 AM
  • Does cygwin\bin\chmod.exe -R 777 C:\Qt\3.3.5\include help?

     

    Sunday, August 27, 2006 3:01 PM
  • nope. sorry.
    just tried it and ran a compilation and immediatly got the:

    c1xx : fatal error C1083: Cannot open source file: 'C:\Qt\3.3.5/include': Permission denied


    I still think it is a problem in dev studio
    Monday, August 28, 2006 8:02 AM
  • I'm much more skeptical that this is a VS bug.

    In your last post, you appear to be trying to compile or include a directory, not a file.  I can reproduce the error myself with:

    #include "c:\qt\include\qt"

    e:\tempprojects\qt\qt\qt.cpp(6) : fatal error C1083: Cannot open include file: 'c:\qt\include\qt': Permission denied

    The following works fine:

    #include "c:\qt\include\qt\qvector.h"

    Furthermore, if I add c:\qt\include\qt directly to the compiler settings "qt" is taken to be a filename to be compiled, and I get:

    c1xx : fatal error C1083: Cannot open source file: 'c:\qt\include\qt': Permission denied

    Try setting the compiler flag -Bd under advanced options and inspect the arguments into the compiler.  Maybe you meant to specify a path and end up compiling a non-existant file?

    I downloaded qt and configured it (mostly anyway).  If this post doesn't address the issue, can you give me the specific steps that causes the problem for you?

    Thanks,

    Brian

    Monday, August 28, 2006 3:33 PM
  • I searched the code for include statements on just the directory and there were none.
    my projects have the $(QTDIR)/include in there project settings.

    So i went to your last suggestion (adding /Bd) to the compiler options ,and then, to my surprise I found the follwing in the 'commandline' options of the c++ section of the project settings:
    /I /I $(QTDIR)/include

    Now i didn't put it there but it seems it was created during the auto conversion from the vs6 DSPs. So i removed it and added the /Bd and since then it hasn't happened (i am still following to make sure).

    btw I found this site that has other compiler undocumented settings that might be helpful :
    http://members.ozemail.com.au/~geoffch@ozemail.com.au/samples/programming/msvc/clopts.htm

    -thedrs
    Wednesday, August 30, 2006 7:14 AM
  • As project conversion is probably a lesser-covered area during testing, I wouldn't be terribly surprised that a bug here was the cause of your problem.  If you could spend a few minutes to see if you can retrace your conversion steps and can reproduce it, and you are willing to submit the necessary files, you can open a bug on this.

    That's a helpful link, but it's very old.  Among the set of undocumented flags meant for development purposes only, I think /Bd and perhaps /Bt is one of those that ought to be elevated to documented status, perhaps under a "Diagnostics" section of Project Properties.

    Brian

    Wednesday, August 30, 2006 2:36 PM
  • I had this error too, and (if that can help someone else) the problem was that I was using a macro as an include directory (environment variable), but the environment variable was not defined. So, my guess is that when VS2005 did the macro substitution, it was empty (no other characters in the include directory path) and it tried to compile the following include directory as a file, which gave this error...
    Friday, May 25, 2007 2:50 PM
  • Macourteau is correct. Visual Studio cannot eat it's own dogfood and if it has a macro in an include dir that isn't defined the error will flow on to other areas without being detected, resulting in an inability to find a header that is Right Effing There (TM).
    Working in C++ reminds me that some things are almost as illogical as Microsoft
    Sunday, November 20, 2011 10:48 PM