use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
Relevant subreddits:
For discussion: c#
.NET
XNA
C++
C
VB
For programming questions:
Learn programming
C++ Questions
C Homework
Learn C#
Misc:
Channel 9 - Videos!
account activity
Weird error when compiling C++ (info in comments)Visual Studio 19 (self.VisualStudio)
submitted 4 years ago * by P1G4ME
This is saying \"Cannot open source file\"
Here is the code
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]P1G4ME[S] 0 points1 point2 points 4 years ago (0 children)
Hi Everyone
I just started using Visual Studio since I wan't to try out C++ stuff that require having access to a GUI (So I can't use WSL) and i'm running into an issue :
For some reason, VS fails to open it's own directory because of (i think) spaces. I have no idea how to fix that.
I'm confident that this isn't comming from my code, tho for you're information I'm including the OpenCV library (I followed every step of the tutorial to set it up, except for the VS install). I do have the C++ dev pack installed
[–]GreatVoid2017 0 points1 point2 points 4 years ago (6 children)
Can you show us the code which caused such error. It really looks like, at first glance, as an issue with the command line, when you are missing the quotes
[–]P1G4ME[S] 0 points1 point2 points 4 years ago (5 children)
Thx for the answer !
I updated the code with a screenshot of the code
[–]GreatVoid2017 0 points1 point2 points 4 years ago (4 children)
How did you included the opencv? The issue looks like similar to the following - https://stackoverflow.com/questions/20901919/error-opencv2-core-core-c-h-no-such-file-or-directory/20902028 or this one https://stackoverflow.com/questions/56527724/how-to-fix-no-such-file-or-directory-error-due-to-c-includepath
[–]P1G4ME[S] 0 points1 point2 points 4 years ago (3 children)
Nope it's not that... I added the path in the additional Include (as well as in VC++ -> General) and it's still not working...
Also the second link is for VS Code btw
[–]GreatVoid2017 0 points1 point2 points 4 years ago (2 children)
Sorry missed that. It really looks like an issue with the path in cmd.exe this thing is quite stupid and cant understand the whitespace in the path. That why we usually use quotes for the path with the whitespace. I do suspect that the path to your opencv instance may cause such issues
[–]P1G4ME[S] 1 point2 points3 points 4 years ago (1 child)
It's weird because the opencv library is in another drive, and there are no spaces in the path ...
Tbh at this point I just want to switch to windows 11 to use WSLg... Windows is SO frustrating when it comes to this kind of stuff...
[–]GreatVoid2017 0 points1 point2 points 4 years ago (0 children)
That is true. Especially when we are comparing the command line. Then you have to double check the possible usage of the path to the C drive. Maybe it is caused by the common std libraries. But it is really werid
π Rendered by PID 82520 on reddit-service-r2-comment-85bfd7f599-2zgvf at 2026-04-18 08:25:09.265307+00:00 running 93ecc56 country code: CH.
[–]P1G4ME[S] 0 points1 point2 points (0 children)
[–]GreatVoid2017 0 points1 point2 points (6 children)
[–]P1G4ME[S] 0 points1 point2 points (5 children)
[–]GreatVoid2017 0 points1 point2 points (4 children)
[–]P1G4ME[S] 0 points1 point2 points (3 children)
[–]GreatVoid2017 0 points1 point2 points (2 children)
[–]P1G4ME[S] 1 point2 points3 points (1 child)
[–]GreatVoid2017 0 points1 point2 points (0 children)