Reputation: 23
I'm learning about dll files and trying to create one. My problem is that when i try to build my solution in visual studio, i'm getting errors saying e.g. "cannot open source file string.h".
This happens for multiple header files. The error is produced by a file other than mine, which includes string.h
I can't figure out how to fix this error, and any help will be greatly appreciated!
Upvotes: 0
Views: 25473
Reputation: 978
I had the same problem with a Visual Studio Project i downloaded from github .
Issue was the Windows SDK Version was set to a version i hadn't installed. I solved it by changing the Configuration Properties -> General -> Windows SDK Version to "< inherit from parent or project defaults >"
Upvotes: 1
Reputation: 926
I had this issue once. The reason was: in VC++ Directories > Include Directories option I had ";" at the end of the line. I edited that property and left a symbol there. It should end with "$(IncludePath)". After removing that character I managed to get it working.
Instead of reinstalling Visual Studio review your project settings.
Cleaning and rebuilding project may help, as well as closing and reloading project. You may also try removing binary build artifacts generated for your project, such as .lib and .obj
Upvotes: 0
Reputation: 11
Hmph try unsistalling and reinstalling Visual Studio this thing happened to me 2 years ago on Vs 2017 because I opened a broken source andd it broke my visual studio :(
Upvotes: 1
Reputation: 5731
I bet you've resolved it by now, but for others who experience this issue, unless you directly deleted files from installed visual studio directory I wouldn't resort to an uninstall/reinstall solution, because then you don't know what went wrong and why.
When I ran into this issue. Two things I had to check and fix to resolve
Upvotes: 1
Reputation: 488
Double clicking item will give you option to change the list. But by default it is generally not required. Until it is changed. If you feel that you have messed everything. Just uninstall visual studio and reinstall it. Every thing will be back to normal.
Upvotes: 1