You probably want to use #include <new>
cannot open include file 'new.h': no such file or directory
Hi All,
I am trying to run a simple mfc demo application in visual studio 2015, but i am not able to build that one successfully.
getting a error message "cannot open include file: 'new.h' : no such file or directory.
can any one please suggest me, what I am doing wrong,how to solve this error.
With Regards,
Asha.S.D
4 answers
Sort by: Most helpful
-
-
rupesh shukla 16 Reputation points
2021-07-19T16:12:57.607+00:00 Make sure that you have proper include file path listed in your solution for new.h. Search for new.h on your disk and add the file path to your include .You can find it either in your Windows Kits or Visual studio folder. Once you had added it then try to recompile your solution.
Thanks
-
Jeanine Zhang-MSFT 9,676 Reputation points Microsoft Vendor
2021-07-20T02:32:08.277+00:00 Hi,
The new.h lives in the SDK folder(e.g. C:\Program Files (x86)\Windows Kits\10\Include\10.x.x.x\ucrt).I suggest you should try to change "Windows SDK version" in project settings, and select the latest "10.x.x.x" version available from the drop-down list.
Best Regards,
Jeanine
If the response is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.
-
Sahib Khan 0 Reputation points
2024-04-05T13:04:23.7+00:00 Make sure you have window sdk installed. Depends upon which windows you are on, on weindows 11 I had to Download 10.0.10240.0 from https://developer.microsoft.com/en-us/windows/downloads/windows-sdk/