Problem in setting the include path - Programmers Heaven

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

Problem in setting the include path

karangkarang Posts: 2Member
Hi

I have opened a VC++.net project

When I compile the project I am getting an error.

fatal error C1083: Cannot open include file: 'Test/Testnamespaces.h': No such file or directory

Now I have created a folder 'Test' and add a header file 'Testnamespaces.h'.

But still I am getting the same error.

Can anyone please help me in resolving this matter.

Regards
Karan

Comments

  • LundinLundin Posts: 3,711Member
    Whether #include paths use or / is poorly specified in the C standard, and this will vary on different compilers.
    Unix uses slashes for paths while Windows uses backslashes etc.

    This is why you should never write a path in the #include string, it will make your code non-portable. Instead, use the plain #include "myfile.h" syntax together with the project functionality of the IDE. Let the IDE find the files for you.
Sign In or Register to comment.