skip to Main Content

For reasons, I use Visual C++ 98 to do development for an old wafer tester platform. I was just ‘upgraded’ to a Windows 11 laptop, and after setting up the PATH variables to match my old Windows 10 laptop, I can not compile without getting missing #include errors (‘file not found’).

To troubleshoot, I have moved the top level #include‘s to the path with the project workspace DSP file, and no longer get the errors with the top level #include, but that header file has several other #include‘s that I now get errors for. I have tried putting the paths containing the #includes at the top of my PATH variable (both user and system) without success.

For reference, I have followed these instructions when installing VC++ 98:

Can Visual Studio 6.0 C++ run in Windows 11?).

Example code:

#include "ntshell.h"

Where ntshell.h lives:

C:pathtoheadersntshell.h

Entry in PATH variable:

C:pathtoheaders

Results:

fatal error C1083: Cannot open include file: 'ntshell.h': No such file or directory

I have tried the same entry in the INCLUDE variable also, without success.

Is there something I’m missing here?

2

Answers


  1. There is no Visual C++ 98.

    For Visual C++ 6.0,
    add Header directory in
    Project Setting >C/C++ >Category:(Preprocessor)> Additional include directories.

    If add the path to INCLUDE environment variable, then close Visual Studio > delete .vs folder > restart.

    Login or Signup to reply.
  2. you have to add the directories you want it to discover the .h files in to the properties,

        [project name] Properties -> Configuration -> C/C++ -> General -> Additional Include Directories
    

    add the directory path to this entry and it should be able to see your .h file now

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search