abel
well, i enter the command "cmake -B build -S . -DCMAKE_TOOLCHAIN_FILE=C:/src/vcpkg/scripts/buildsystems/vcpkg.cmake", then i can acquire a right result
abel
but i click the button in vscode
abel
[main] Configuring project: test [proc] Executing command: "D:\Pro\Program Files\CMake\bin\cmake.EXE" --no-warn-unused-cli -DCMAKE_TOOLCHAIN_FILE:STRING=C:/src/vcpkg/scripts/buildsystems/vcpkg.cmake -DCMAKE_EXPORT_COMPILE_COMMANDS:BOOL=TRUE -DCMAKE_BUILD_TYPE:STRING=Debug -DCMAKE_C_COMPILER:FILEPATH=D:\Msys64\clang64\bin\clang.exe -DCMAKE_CXX_COMPILER:FILEPATH=D:\Msys64\clang64\bin\clang++.exe -SD:/Doc/Code/prictice/sample/test -Bd:/Doc/Code/prictice/sample/test/build -G Ninja [cmake] Not searching for unused variables given on the command line. [cmake] CMake Error: Error: generator : Ninja [cmake] Does not match the generator used previously: Visual Studio 17 2022 [cmake] Either remove the CMakeCache.txt file and CMakeFiles directory or choose a different binary directory. [proc] The command: "D:\Pro\Program Files\CMake\bin\cmake.EXE" --no-warn-unused-cli -DCMAKE_TOOLCHAIN_FILE:STRING=C:/src/vcpkg/scripts/buildsystems/vcpkg.cmake -DCMAKE_EXPORT_COMPILE_COMMANDS:BOOL=TRUE -DCMAKE_BUILD_TYPE:STRING=Debug -DCMAKE_C_COMPILER:FILEPATH=D:\Msys64\clang64\bin\clang.exe -DCMAKE_CXX_COMPILER:FILEPATH=D:\Msys64\clang64\bin\clang++.exe -SD:/Doc/Code/prictice/sample/test -Bd:/Doc/Code/prictice/sample/test/build -G Ninja exited with code: 1
abel
that's the error message
Danya🔥
Probably because VS Code know nothing about how you run CMake
Danya🔥
Google how to change cmake settings in VS Code
abel
what's means that
abel
you mean this:"Adding the following to your workspace settings.json will make CMake Tools automatically use vcpkg for libraries"?
abel
that's the sentence in official guide
Danya🔥
So why don't you follow it?
abel
and i follow this guide
abel
it ask me to add "cmake.configureSettings": { "CMAKE_TOOLCHAIN_FILE": "C:\\src\\vcpkg\\scripts\\buildsystems\\vcpkg.cmake" }, into the settings.json, and i did it, but it still have error
abel
err, i don't know how to say, but just now, i clean the cache, and build it again by same method
abel
and it worked
abel
but, why?
John
I need official website to learn Data structure and allogarithms in c++ or c , please any recommendations?
LUCKY
hi
Anonymous
[main] Configuring project: test [proc] Executing command: "D:\Pro\Program Files\CMake\bin\cmake.EXE" --no-warn-unused-cli -DCMAKE_TOOLCHAIN_FILE:STRING=C:/src/vcpkg/scripts/buildsystems/vcpkg.cmake -DCMAKE_EXPORT_COMPILE_COMMANDS:BOOL=TRUE -DCMAKE_BUILD_TYPE:STRING=Debug -DCMAKE_C_COMPILER:FILEPATH=D:\Msys64\clang64\bin\clang.exe -DCMAKE_CXX_COMPILER:FILEPATH=D:\Msys64\clang64\bin\clang++.exe -SD:/Doc/Code/prictice/sample/test -Bd:/Doc/Code/prictice/sample/test/build -G Ninja [cmake] Not searching for unused variables given on the command line. [cmake] CMake Error: Error: generator : Ninja [cmake] Does not match the generator used previously: Visual Studio 17 2022 [cmake] Either remove the CMakeCache.txt file and CMakeFiles directory or choose a different binary directory. [proc] The command: "D:\Pro\Program Files\CMake\bin\cmake.EXE" --no-warn-unused-cli -DCMAKE_TOOLCHAIN_FILE:STRING=C:/src/vcpkg/scripts/buildsystems/vcpkg.cmake -DCMAKE_EXPORT_COMPILE_COMMANDS:BOOL=TRUE -DCMAKE_BUILD_TYPE:STRING=Debug -DCMAKE_C_COMPILER:FILEPATH=D:\Msys64\clang64\bin\clang.exe -DCMAKE_CXX_COMPILER:FILEPATH=D:\Msys64\clang64\bin\clang++.exe -SD:/Doc/Code/prictice/sample/test -Bd:/Doc/Code/prictice/sample/test/build -G Ninja exited with code: 1
You are using Ninja Generator in the latter case and Visual Studio generator in the former case. So two different use cases. Do you have Ninja installed in your system? If not, you can use the Visual studio generator using the -G flag. CMake is a build generator and you can use it to generate builds for Ninja, Make, solution file for Visual Studio, Meson etc etc.
Anonymous
Ahmed
Welcome guys I’m beginner, I cannot download msys2 in macOS to execute these commands; 👇 Pacman -syu Pacman -su Pacman -Ss gcc Pacman -S mingw-w64-x86_64-gcc Pacman -Ss gdb Pacman -S mingw-w64-x86_64-gdb gcc —version g++ —version gdb —version
Ahmed
Can I get some instructions for executing these commands to complete the tutorial ?
\Device\NUL
Can I get some instructions for executing these commands to complete the tutorial ?
Truly smart 👍, Using MSYS2 on MacOS. MSYS2 Software Distribution and Building Platform for Windows.
Ahmed
Didn't Mac OS have clang?
I don’t know but I already download specific clang for c++ to download compiler in Vscode
Ahmed
.
Hi
.
C progeamming
\Device\NUL
There's no need to stuff like that in *nix world
Ahmed
There's no need to stuff like that in *nix world
Oky but how can I execute pacman -syu and other commands?
\Device\NUL
Oky but how can I execute pacman -syu and other commands?
There's no Official Package Manajer on MacOS afaik, but you can try homebrew
Mahdiy
For install homebrew: https://brew.sh/
buggi
Anyone has let us c++ in pdf format?
Anonymous
Anyone has let us c++ in pdf format?
Let us C++ is a bad book to learn C++ from. Check out the resources section in the message above for recommended books
Anonymous
Anyone has let us c++ in pdf format?
Moreover read the rules. Piracy is not allowed here especially if they are rank bood books
C
can anyone tell me what do i need to learn to create my Own web browser?
C
i'm curious
C
or atleast work in some open source browser
klimi
can anyone tell me what do i need to learn to create my Own web browser?
For what reason? Without more information: No, you don't need that
Danya🔥
can anyone tell me what do i need to learn to create my Own web browser?
https://youtube.com/playlist?list=PLMOpZvQB55be0Nfytz9q2KC_drvoKtkpS You can watch this for example
klimi
He wants to know what to learn for that
Oh! Didn't parse that message correctly, my bad!
....
Can we return a string instead of int? If yes then how??
....
Simple while using a function we generally return 0 or some values
....
Cab we return a string in it? Instead of returning some values of integer in it
Mr
Simple while using a function we generally return 0 or some values
string function(parameters){ string str; // Your Code here return str; }
Anonymous
assume cs:codesg codesg segment dw 0abcdh,02h,03h,04h dw 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 start: mov ax,cs mov ss,ax mov ds,ax mov sp,18h mov bx,0 mov ax,0 mov cx,4 s: push [bx] add bx,2 loop s mov bx,0 mov cx,4 s0: pop [bx] add bx,2 loop s0 mov ax,4c00h int 21h codesg ends end start
Anonymous
The intel8086assembly I wrote according to my idea d3d:0 7 should be 04 00 03 00 02 00 CD AB, but the result is wrong
Omar
Can someone who is an expert from this group in the C language send me a private message quickly because I have a question that I must solve now, and thanks 🙏
az
Guys, i am digging into nginx source code. I am wondering why author has chosen keeping sentinel for red-black tree outside of struct ngx_rbtree_t itself? Why not just to keep it inside of ngx_rbtree_t https://github.com/phusion/nginx/blob/master/src/core/ngx_rbtree.h
Student
Peace
Student
I get this error when compiling a C++ Windows desktop application
Student
Severity Code Description Project File Line Suppression State Error LNK1107 invalid or corrupt file: cannot read at 0x496 WindowsProject1 C:\Users\Night\Desktop\cryptolib\cryptopp-master\aes.h 1 Error MSB6006 "link.exe" exited with code 1107. WindowsProject1 C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets 1127
Student
The aes file is coded correctly but I still get the error and in the source code I added directory of the aes.h file but still getting the error
Student
The source code displays no errors
Anonymous
Then teacher what should I do?
I have no idea what you are doing. A linker should be passed things like object files, dll files, lib files etc. The linker doesn't need header files. So I guess you either have the wrong configuration on your IDE or are just doing things plain wrong. Read up about your IDE/compiler before beginning to use it
Student
I need to use cryptlib libraries
Anonymous
Guys, i am digging into nginx source code. I am wondering why author has chosen keeping sentinel for red-black tree outside of struct ngx_rbtree_t itself? Why not just to keep it inside of ngx_rbtree_t https://github.com/phusion/nginx/blob/master/src/core/ngx_rbtree.h
If you kept them inside a tree node, then every node must store information on whether it is a sentinel or not. Granted you could just check the children nodes to determine if something is a sentinel or not. But keeping it outside makes some algorithms like deleting easier as you just have to iterate through the sentinel nodes rather than through the entire tree. Also keeping it outside can help in ensuring that they always remain black.
Student
try vcpkg
Thanks I will do that
Anonymous
Hi guys! Anybody can help me understand this code: st = set_intersection (set1, set1 + 6, set2, set2 + 6, v.begin());     v.resize(st - v.begin()); This program make intersection between vectors. Yet solved, but i can't understand this part the code. exactly in the resize function
Ludovic 'Archivist'
Hi guys! Anybody can help me understand this code: st = set_intersection (set1, set1 + 6, set2, set2 + 6, v.begin());     v.resize(st - v.begin()); This program make intersection between vectors. Yet solved, but i can't understand this part the code. exactly in the resize function
Set_intersection will return the first element that is not part of the intersection after reordering the vector to make that valid, you can then resize the vector to clean up and only keep the intersection in the vector
Rejwana
Can Anyone help me, if red+blue=purple, Red+Green=yellow,Blue+green=cyan, then like input given RBG with replace PG how to solve it using stack in c++?