ant2009
ant2009

Reputation: 22696

Fatal error c1083 permission denied

Visual Studio 2008.

I downloaded a sample project and unzipped it.

I have to convert it from VS 7 to VS 9. However, the conversion was successful.

However, when I try and compile I get the following error:

c1xx : fatal error C1083: Cannot open source file: 'C:\NMS\inc': Permission denied

However, the inc directory I have used before for other projects. And have successfully included the inc files.

So I am not sure why this project does not work.

Many thanks for any suggestions,

Upvotes: 1

Views: 3482

Answers (2)

Naudy
Naudy

Reputation: 11

This error comes when you have defined a variable in "Additional Include Directories" column and that variable has no value.

check the same by following the path: Right click on the solution->Properties->C++->General

Two ways to Solve: Suppose the variable defined is AX

  1. create a batch file
    • set AX="path of your include directory".

or

  1. Right click on my computer->properties->Advanced System Settings->Advance(Tab)->"Environment Variables"->system variable and add or define that variable with its value(which is the path of your directory).

Note in both the cases the value can be the path of your include directory or If you don't wish to give path in that variable give it a fake path(like "c:\")

Define your path again in the project properties. and restart the VS. it will work..

Upvotes: 1

Anders Abel
Anders Abel

Reputation: 69300

It looks like it's trying to open a file called C:\NMS\inc, which it can't if that path is a directory.

Upvotes: 1

Related Questions