Error include headers

Posts 19 of 9 · Page 1 of 1
Error include headers
I have some strange problem in Hansbase then i tries to add headers and include them :S

i have added a something.h in the project and in the code i have
Code:
#include <iostream>
#include "something.h"
but i allways get the error that it cant the included file "something.h"

but i added another header file along time ago called time.h => no problems but i dont remb if i did anything else...
It sounds like you need to put something.h into your project folder, but I could be wrong.

Would you mind posting the full error?
Quote Originally Posted by Void View Post
It sounds like you need to put something.h into your project folder, but I could be wrong.

Would you mind posting the full error?
i have look into teh directory to my project and its there...

the Error is :
fatal error C1083: Cannot open include file: 'int.h': No such file or directory
Do you have the file in the same directory as your code?
Are you sure int.h is in the same directory as your main source file? If it is, and it still doesn't work, check again and make sure you didn't make any typos.
Quote Originally Posted by Void View Post
Are you sure int.h is in the same directory as your main source file? If it is, and it still doesn't work, check again and make sure you didn't make any typos.
I use hansbase so i added an existed file and added all the files from his project and debug/release then added a new .h
but the time.h is also in the projet folder as the something.h
Try this.

The Visual C++ compiler has a number of directories that it will search when looking for #include'd (or linked) files. Quite simply, you haven't configured yours to search in the correct place

Usually, if you install the SDK after you install your IDE then it will configure it accordingly.

In Visual C++, go to the "Tools" menu, select "Options". Expand the "Projects and Solutions" node on the left-hand side. Select "VC++ Directories". You should see a pane with a list of folders... Use the drop-down in the top right ("Show directories for..") to be "Include Files". Add the \include folder from your SDK installation. You might want to add the \lib folder to the "Library Files" section as well.

Click "okay" and you're ready to go!

hth
Jack
Taken from MSDN forums, etc.

http://social.msdn.microsoft.com/for...-5bde479d6925/

EDIT:

Also, if that doesn't help. It'd be nice if you could post your Compiler, Version, and etc. so others may be able to help you.
It may not be good enough to simply add the files to your project. Try physically moving the files to your project folder.
Quote Originally Posted by why06 View Post
It may not be good enough to simply add the files to your project. Try physically moving the files to your project folder.
but the time.h is also in the projet folder as the something.h
I'm assuming he tried that, but then again, he might have done something different than said. o-o
Posts 19 of 9 · Page 1 of 1
This thread is closed for replies.

Similar Threads

Tags for this Thread

None

Need help?