New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Totally puzzled by this page - please help me understand #239
Comments
Hello, first, I'm another user sharing information. I'm not a Quotation MarksI noticed some issues with the instructions. I'm not sure if what terminal environment you are using: CMD, Powershell or Bash. I use CMD, and noticed the instructions from CMD aren't quite correct. This is wrong in CMD
This causes The correct syntax for this is one of the following
I agree that the first one seems odd that the quotes are cuddling the variable and the path. However, that is a Windows-ism that clearly identifies the beginning and end of the set expression. For the second one, you don't know if there are any spaces after Consider trying the following to see how this works:
|
As @RochaStratovan this is a bug in the instructions, the correct syntax is
You are right about how env vars work and we should clarify this in the article.
Creating the The
Thanks for the feedback! |
Thank you @RochaStratovan and @vicroms . |
Hi there,
Thank you for this page. I am trying to understand how CMake in VS works, and it is a big help.
It also gives me a lot of headache. I managed to follow it in the end, but it took me two whole evenings, which is much more than I am used to. I am still puzzled about some parts of it, and I found some minor mistakes in documentation.
1. Quotation marks issue
The documentation says:
set VCPKG_ROOT="C:\path\to\vcpkg"
If you do this, then you will get the following warning when runningvcpkg new --application
:warning: The vcpkg C:\Bin\Dev\vcpkg\vcpkg.exe is using detected vcpkg root C:\Bin\Dev\vcpkg and ignoring mismatched VCPKG_ROOT environment value "C:\Bin\Dev\vcpkg". To suppress this message, unset the environment variable or use the --vcpkg-root command line switch.
First I did not realize what the problem was, so I tracked down that I had vcpkg also installed as a part of VS. I uninstalled it, even restarted the Windows, just to be sure, still the warning stayed. It was just then that I realized vcpkg expects the path without quotation marks.
2. Puzzled about env vars
This sentence: "Setting VCPKG_ROOT helps Visual Studio locate your vcpkg instance." puzzles me. As far as my knowledge goes, environment variables are local to the command prompt. If I open another developer prompt, there is no VCPKG_ROOT defined. I suppose it is not defined for the Visual Studio itself. I googled it if I am wrong, but didn't find any proof. So I think that this sentence is not true. I am not sure, though. Please let me know if I am wrong.
3. Puzzled about the jsons
In the old times, without vcpkg I would create a CMakeLists.txt file, added a fetch_content for fmt, and I was done, with just a few lines of code. Now we need to run extra tools, and create three extra jsons. One of these jsons cannot even be put in VCS. OK, I can add it to .gitignore, but then on the other computers the other users must recreate it. I could not memorize it. I would need to google it. This sounds bad. You said that explaining the third json is outside of the scope of this document. So my question: why is it worth doing things this way if it is so much more complicated? I am asking this honestly. No malice or passive-aggressive things here. I really would like to understand, as I see the world is going this direction. I'd really appreciate if you answer this question.
4. Advice for documenting hotkeys
The documentation says:
Press Ctrl+Shift+B to build the project in Visual Studio.
- I would advise you to first always define where can a feature be found on the user interface, and add the hotkeys just after that. I have never used Ctrl+Shift+B before, so I did not know what it is (I used F7 instead). When starting VS this way, the buttons and menus are different on the UI, and even the wording you use is different. Normally these hotkeys build the solution, not the project. So it was not clear for me that you changed the meaning of the words.I hope these minor notes help improving the documentation, and I am looking forward for your answers.
Cheers,
Khardan
Document Details
⚠ Do not edit this section. It is required for learn.microsoft.com ➟ GitHub issue linking.
The text was updated successfully, but these errors were encountered: