C++ Compilation error; very strange?

I am sorry if I am to exercise bad judgment again but I could not stomach a thought that it is not a C++ question since it is a compilation error so strange that I cannot explain it at all.

I had this include statement in a .cpp source file:
#include <C:\WINNT\SYSTEM32\MFCN4D.DLL>
The error I got, justly, that such a file does not exist. I corrected the statement:
#include <C:\WINNT\SYSTEM32\MFCN42D.DLL>
This file does exist but I keep getting the old error on compilation:
Error 1 fatal error C1083: Cannot open include file: 'MFCN4D.DLL': No such file or directory 

Wait a second, I commented the statement out completely which now does not even have MFCN4.DLL only MFCN42.DLL. The error persists even after I close the VS2005 browser and reopened it again.

I did a total find:

Find all "MFCN4D.DLL", Subfolders, Find Results 1, "Entire Solution"
Matching lines: 0 Matching files: 0 Total files searched: 4

Also when I get the compiler error it points to Line # 1 and it is not where this include is.

Am I hallucination or something I am almost afraid to post this fearing that some simple oversight is causing this. It might be obvious to someone but not me.


Thanks.




Answer this question

C++ Compilation error; very strange?

  • Neil Groves

    I have no idea why it would still complain if you removed the whole line.

    Does cleaning the solution fix the issue

    Note: such blunder and how you are trying to use the #using directive indicates to me that you are trying to learn the language through these forums. If you really want to understand the language books are the best way.

    Thanks,
      Ayman Shoukry
      VC++ Team


  • rb531

    I used Borland's C++ many years ago and that's it. Now it is refreshing procedd with many Microsoft specifics added. In the intervening years I have been doing Pascal, Visual dBase, C# (some) and FoxPro.

  • RussA

    I think you are on the right track. I did not use any cleaning. I am planning to get to learn how to do it today. I actually destroyed that project and transferred all the code to a new one. Now it has a purely academic interest for me but should it happen again I will use cleaning first and then other options.

    Thanks.

  • Zeph_Solaris

    Of course you are right but it is a diversion from my question. It was another blunder but after I commented it out, purged it completely it still gives me the same error as if the statement is there still. I rebooted the computer, same thing. I changed the #include to #using MFCN42.dll but it still says that MFCN4D.dll not found.

  • ZBufferMan

    Are you sure you wanted to use #include since include is for including header files that gets compiled as part of your code and not binaries as you are trying to do.

    Or did you mean to use the #using directive

    Thanks,
      Ayman Shoukry
      VC++ Team

  • C++ Compilation error; very strange?