Jump to content

Visual Studio error

mikeeginger

When Compiling my project I got this unexpected errorC1083 Cannot open Included File stdlib.h No such file or directory 

I have no idea why this is happening it has never happened before

 

 

Thoughts

#include <stdlib.h>#include <stdio.h>int main (){	printf("Please Enter Student ID number");	scanf("%d"\n);	printf("Please Enter Makrs for each module");	("%d"\n);	return 0;}

IntelCorei54670k,Maximus VI Formula,Swift tech H220, 16gigs Corsair Dominator platinums, Asus DCUII GTX 780,1x256 840 evo, 1x 2TB Segate barracuda, Corsair AX 860, 

3 X Noctua NF-F12, 2x Noctua NF A-14, Ducky Shine 3 Blue Leds Blue switches, Razer Death Adder 2012, Corsair vengence 1400  

Link to comment
Share on other sites

Link to post
Share on other sites

hmm, if I have do guess your project properties might have gotten messed up (In VC++ Directories the include probably got jumbled up)....that would be my first guess.  Another thing could be that you have errors somewhere in a header file...this can sometimes cause a cascading effect of errors...just out of curiosity, is the this first error you get? (A messed up header usually causes tons of errors :P ).

 

On a side note, if this is the first time it has happened I would just suggest creating a new project and copying over your code if it is the properties that got messed up....I do that occasionally it just saves time in finding the error :P

 

Not sure if this will help either, but there appears to be a discussion here (http://stackoverflow.com/questions/7206393/reference-error-while-compiling-c-file-in-vs2010-command-prompt) about the same problem you are having.  Let us know if you fix it :D

0b10111010 10101101 11110000 00001101

Link to comment
Share on other sites

Link to post
Share on other sites

hmm, if I have do guess your project properties might have gotten messed up (In VC++ Directories the include probably got jumbled up)....that would be my first guess.  Another thing could be that you have errors somewhere in a header file...this can sometimes cause a cascading effect of errors...just out of curiosity, is the this first error you get? (A messed up header usually causes tons of errors :P ).

 

On a side note, if this is the first time it has happened I would just suggest creating a new project and copying over your code if it is the properties that got messed up....I do that occasionally it just saves time in finding the error :P

 

Not sure if this will help either, but there appears to be a discussion here (http://stackoverflow.com/questions/7206393/reference-error-while-compiling-c-file-in-vs2010-command-prompt) about the same problem you are having.  Let us know if you fix it :D

Yep Just tried Creating a new Project same result in fact even more errors

and this is a fresh install as of today so it's not like the program is old

IntelCorei54670k,Maximus VI Formula,Swift tech H220, 16gigs Corsair Dominator platinums, Asus DCUII GTX 780,1x256 840 evo, 1x 2TB Segate barracuda, Corsair AX 860, 

3 X Noctua NF-F12, 2x Noctua NF A-14, Ducky Shine 3 Blue Leds Blue switches, Razer Death Adder 2012, Corsair vengence 1400  

Link to comment
Share on other sites

Link to post
Share on other sites

Well the only thing I can think of (baring seeing more of your code, ie headers you are including) would be to ensure that VS is pointing to the include directory (who knows, if it is a fresh install perhaps it got installed to a weird folder).

The other thing (which I doubt would be a problem), but you can use #include <stdlib> instead of #include <stdlib.h>.

0b10111010 10101101 11110000 00001101

Link to comment
Share on other sites

Link to post
Share on other sites

Well the only thing I can think of (baring seeing more of your code, ie headers you are including) would be to ensure that VS is pointing to the include directory (who knows, if it is a fresh install perhaps it got installed to a weird folder).

The other thing (which I doubt would be a problem), but you can use #include <stdlib> instead of #include <stdlib.h>.

The code is posted is all my code so far for that program I just started it

I will try including the headers that way to see if it works

 

ps Thank you for the help so far even if it doesn't fix the problem

IntelCorei54670k,Maximus VI Formula,Swift tech H220, 16gigs Corsair Dominator platinums, Asus DCUII GTX 780,1x256 840 evo, 1x 2TB Segate barracuda, Corsair AX 860, 

3 X Noctua NF-F12, 2x Noctua NF A-14, Ducky Shine 3 Blue Leds Blue switches, Razer Death Adder 2012, Corsair vengence 1400  

Link to comment
Share on other sites

Link to post
Share on other sites

The code is posted is all my code so far for that program I just started it

I will try including the headers that way to see if it works

 

ps Thank you for the help so far even if it doesn't fix the problem

 

Oh, lol sorry, I had thought there was more....and had totally missed reading through the code you posted

 

Well just looking at your code itself there are a few major errors which you want to fix then before tackling the header error.

scanf("%d"\n);

should be

int studentId;

scanf("%d", &studentId);

 

And similar with this line

("%d"\n);

should be

int marks;

scanf("%d", &marks);

 

see if that clears up your errors then

 

It compiles on mine at least after the changes, so if you still get the error after correcting the code then you might consider reinstalling or try creating the project differently

0b10111010 10101101 11110000 00001101

Link to comment
Share on other sites

Link to post
Share on other sites

try this: "stdlib.h" instead of <stdlib.h>

 

It will look in your windows header directory in this way

Link to comment
Share on other sites

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×