Not him, but I only want to speak with native English speakers. The Anglo Saxon made a tremendous mistake in exporting English and the internet. Very sad!
I'm saying setting up a whole dev environment for C++, also using other libraries on frameworks, is the most convuluted process I've seen in any modern language
why do you guys autist out over hurr durr just install exactly this program 1 time
no professional works like that
2 weeks ago
Anonymous
see
[...]
>$ cmake -G "Visual Studio 17 2022" -A x64 .. >bash: cmake: command not found
Your mistake is "trying to make C++ work in <text editor". Let me guess, you're a Windowsgay? You need to use a build system like GNU Make, CMake, or Meson, and write a config for that. This has nothing to do with your text editor.
doing C++ on windows means getting visual studio the IDE, not the VS Code text editor. windows is not complicated anon 🙂
and if you need 3 hours to set up that shit on linux, just give up.
Are you using windows? Just use just werks OS like mac or linux
homie just type "make" on the commandline. Maybe go the extra mile and cmake .; make
what the actual frick is wrong with you gui troony cattle
>Are you stupid anon? Of course you need to use this specific editor (we can't even agree on which though), and obviously you have to manually configure your build system. Oh and you expect it to work on all major desktop platforms? That's ridiculous. You have to dev on X with XY setup and tools.
Meanwhile all real languages like Go, Rust, Zig etc just work by default with no tinkering, everywhere. No wonder that the C/C++ ecosystem is making no progress at all and all new interesting software is made in other languages. It's because C trannies spend all day tinkering with config files and IDE extensions, and arguing on IQfy that it's actually impossible to make a language that actually works.
kek based
I still don't get so many IQfygays are obsessed with C/Cpp beyond small performant modules only when needed
they are objectively worse languages and make you do more shit. just pick a high level language to express your intention easier
Your mistake is "trying to make C++ work in <text editor". Let me guess, you're a Windowsgay? You need to use a build system like GNU Make, CMake, or Meson, and write a config for that. This has nothing to do with your text editor.
same experience, took me a whole day trying to figure out how to get the damn thing to work. I must say I haven't used c++ or c for that matter in over 10 years but still.
the worst part? I already forgot how I did it
>just make your computer become linux
frick no. if you need gcc(garbage c compiloooor) then just save mingw on some folder and add the bin folder to system 'path' variable
Not once I have got fricked in ass by using MSVC. Always I have got fricked in ass by GNU C. Why? Well, guess what: windows systems are not GNU project native so GNU has own quirks in replacement.
2 weeks ago
Anonymous
ESL
2 weeks ago
Anonymous
I've ran into some obscure bug with MSVC's C file IO calls a few years ago (win10). Randomly, it would fail to read a file in binary mode. I thought I was going crazy, but the same code ran perfectly under MinGW. The only hint on the entire internet was hidden in a single stackoverflow comment expressing the same exact situation. I wouldn't trust that shit for C++.
VSCode isn't some black box that will magically compile for you. Choose a build system, get it to work OUTSIDE of VSCode, then either write a minimal tasks.json file or get an extension to integrate your chosen build system into the editor. Or, you know, just use the built in terminal.
funny how everyone says it's easy but yet to give a detailed guide on how to do it and instead just gives vague answers.
maybe it's not so easy after all
int main() {
std::cout << "Hello World!n";
return 0;
}
g++ -o hello main.cc
./hello
Easy as. Now if you want to have it automated:
https://www.softwaretestinghelp.com/cpp-makefile-tutorial/
do you not know how to pass include dirs and dynamic lib locs to your commandline?
is this your CS101 homework
2 weeks ago
Anonymous
but it's different for every compiler
2 weeks ago
Anonymous
its the same for clang and gcc
what other compilers matter?
2 weeks ago
Anonymous
Nah, It just happens that I have xbox360 controller on PC. Now can you do it? This is more like real life enviroment scenario outside fizz buzzing to CMD
I hate cpp as much as the next guy cause its shit (same as rust) but this is a Windows problem not a cpp problem
you're trying to build something that requires specific windows libraries and you don't know how to provide them. Check microsoft documentation or contact them for support, your issue has nothing to do with cpp in general
How are they supposed to give detailed answers to a totally vague OP? What knowledge does OP already have? Does OP have a preferred build system? Someone could write a Makefile or a CMakeLists for you but that's not gonna teach you how to actually do shit yourself and without a bit more info nobody is gonna be able to do that.
I'm glad we're not hiring zoomers anymore lol. Your generation is utterly useless. LLMs are a net improvement.
2 weeks ago
Anonymous
HAHAHAHA
Absolutely braindead take. >i shouldn't event have to
Then who will?
2 weeks ago
Anonymous
it should already do it by default
why should i need to configure anything at all
2 weeks ago
Anonymous
Any sort of real-life software development that isn't CS homework would require writing build files, be it for make, autotools, cmake, or meson.
2 weeks ago
Anonymous
that's nonsense
i highly doubt anyone is doing that outside of their basements
i guarantee nobody working a job has to do that
2 weeks ago
Anonymous
you clearly have never had a serious software development job
webdev?
2 weeks ago
Anonymous
it does not need any file. i compiled it on gcc. but not without other Anon's help.
gcc [WHAT HERE?] main.cpp [AND HERE?]
2 weeks ago
Anonymous
That's just for one file. If your program has multiple files, you will want to use a build system. Of course it's possible to compile a multi-file program by hand, but that's stupid.
2 weeks ago
Anonymous
it's just 25 row script, anon
2 weeks ago
Anonymous
25 rows too many and 1 script too much
2 weeks ago
Anonymous
>25 row script
If only there existed tooling and scripting languages specifically for building software...
2 weeks ago
Anonymous
Don't tell him about unity builds
2 weeks ago
Anonymous
>C++ gays actually believe this >the idea of a language with a default build system that works without tinkering is completely beyond their grasp
2 weeks ago
Anonymous
>C++ >language with a default build system
I can't tell whether he's actually moronic or it's just really shit bait anymore.
2 weeks ago
Anonymous
I'm having trouble parsing your posts, they might be a bit too moronic for me. Are you saying that C++ doesn't have a default build system? That's what my post was saying as well.
Good languages have a default build system that works, so you don't have to waste time on irrelevant tinkering.
2 weeks ago
Anonymous
>Are you saying that C++ doesn't have a default build system?
Yes moron. >Good languages have a default build system that works, so you don't have to waste time on irrelevant tinkering.
No. This is an exception rather than a rule. A language at its core is really just a specification. E.g. ECMAScript, C, C++. None of these come with build systems, because they're just specifications. Rust/Cargo is an exception here. Interpreted languages don't come with build systems because they're not built.
C/C++ is a systems language, there is no one way to build C/C++ programs. Setting up a build system really isn't that hard if you know what you're doing. Arguably using Windows to learn it is shooting yourself in the foot.
2 weeks ago
Anonymous
>there is no one way to build C/C++ programs.
You keep repeating these things as if we don't already know them, but it looks like you're not thinking about them critically. Does it HAVE to be that way? What's the benefit? >Interpreted languages don't come with build systems because they're not built.
The real world proves you wrong, C++ is almost always built. Examples in this thread:
That's just for one file. If your program has multiple files, you will want to use a build system. Of course it's possible to compile a multi-file program by hand, but that's stupid.
Any sort of real-life software development that isn't CS homework would require writing build files, be it for make, autotools, cmake, or meson.
>Setting up a build system really isn't that hard if you know what you're doing.
Again, what you say has no connection to the real world. Setting up a build system adds an incredible amount of complexity to C++ development, from the hobbyist spending hours trying to compile a simple Qt program on Windows, up to pic related. >Rust/Cargo is an exception here
No, it's not. All "new" languages like Golang and Zig are going in the same direction: a single tool distributed with the compiler that makes all code and dependencies Actually Just Work with one command.
It's an idea seemingly so obvious that it's kind of unbelievable that I have to argue about it. Even C++ libraries like SDL3 are finally realizing how bad the situation is and are doing their best to just work with as little interaction with the build system as possible. (https://cohost.org/danielg/post/627154-in-sdl3-sdl-main-wi)
2 weeks ago
Anonymous
languages don't come with build systems because they're not built. >The real world proves you wrong, C++ is almost always built. Examples in this thread:
That's just for one file. If your program has multiple files, you will want to use a build system. Of course it's possible to compile a multi-file program by hand, but that's stupid.
(You)
Any sort of real-life software development that isn't CS homework would require writing build files, be it for make, autotools, cmake, or meson.
(You) >interpreted languages >C++
...
2 weeks ago
Anonymous
You got me, you successfully confused me by bringing up interpreted languages for no reason even if nobody was talking about them. You still know what I mean in the rest of my post though.
All I should need to do is click file - use C++
that is it
if anything more is needed then they have failed
i should not have to create make transform define anything at all
https://www3.ntu.edu.sg/home/ehchua/programming/cpp/gcc_make.html >The linker searches the so-called library-paths for libraries needed to link the program into an executable. The library-path is specified via -Ldir option (uppercase 'L' followed by the directory path) (or environment variable LIBRARY_PATH). In addition, you also have to specify the library name. In Unixes, the library libxxx.a is specified via -lxxx option (lowercase letter 'l', without the prefix "lib" and ".a" extension). In Windows, provide the full name such as -lxxx.lib. The linker needs to know both the directories as well as the library names. Hence, two options need to be specified.
What the frick is the gcc linker's problem? Why you need specify the link like this
gcc -lXInput main.cpp ---
Why it just did not search for it? What the frick is wrong with this ancient unix shithole?
>Why it just did not search for it? What the frick is wrong with this ancient unix shithole?
Because there's often different libraries that define the same symbols.
There's no need to do all of this yourself, you can use pkg-config.
e.g. use this to get the flags and libs for libsoup:
pkg-config --libs --cflags libsoup-2.4
Why Microsoft Visual Studio searches depencies from almost everywhere and even if it fails, then you can just add the missing path from a human usable menu? Why GCC cannot search from paths that it already knows? it still needs to be linked manually
You are comparing Visual Studio (a graphical IDE which allows graphical management of project configuration) to GCC (a compiler). To give a fair comparison, try comparing gcc to cl.exe instead and see how far you get with trying to specify custom include directories to the latter.
Or just compare Visual Studio with another IDE which allows you to configure stuff instead of comparing it with a bare command line compiler that needs everything to be specified to it (which is the job of the build system, usually included in an IDE).
cl.exe won't let you shit your own bed, and thus is only callable from visual studio promptline. it also seem to link just fine and needs explicite /c flag to not.
>cl.exe won't let you shit your own bed, and thus is only callable from visual studio promptline
this is not remotely true, you can run cl.exe from any windows terminal
people do it all the time for msvc builds for projects that aren't VS projects
Windows is cancer for C/C++, use this https://www.msys2.org/
How to write a Makefile: https://www.softwaretestinghelp.com/cpp-makefile-tutorial/
>Download a compiler of choice >Add to path >Use one of the 10 million C++ extensions
Wow so hard anon
2 weeks ago
Anonymous
Windows is cancer for C/C++, use this https://www.msys2.org/
How to write a Makefile: https://www.softwaretestinghelp.com/cpp-makefile-tutorial/
MSYS2 not strictly a "program" per se, it's an environment that can install other software. Also in MSYS2 you typically uses pacman to install packages (similar to Arch Linux).
>Download a compiler of choice >Add to path >Use one of the 10 million C++ extensions
Wow so hard anon
>*write C++ code* >oh, I need to build it, gonna use that cmake thing >*runs cmake* >EH ERROR >ops, I probably forgot to install the compiler >*runs cmake* >EH ERROR >wtf, man, everything is installed fine >*waits 3 years until ChatGPT is launched* >damn, this AI thing is great, i'll finally learn how to compile a C++ project >*asks help to chatgpt* >oh, cmake isn't actually a build system nor a compiler, I'll to install this ninja thing >*hello world compiles* >cool, now I'll compile Godot >What? Why do I need to install all those other softwares to compile that shit?
The average C++ dev life.
>What? Why do I need to install all those other softwares to compile that shit? >The average C++ dev life.
The average Windows experience. When you don't have a package manager to install libraries.
>making anything with the highly unsafe boomer languages
Just use Rust you idiot
troony language for troony people.
Why are you troony?
c is not safe. c++ is as safe as rust you idiot.
skill issue
Works fine with neovim (tm)
>now
>spent
You probably speak English for 20 years too and still make silly mistakes. Maybe it's just a skill issue, after all.
what do you mean
you know internet is a international place right?
have spoken*
Not him, but I only want to speak with native English speakers. The Anglo Saxon made a tremendous mistake in exporting English and the internet. Very sad!
you are not anglo saxon, Rajeesh. Even if you larp as one.
>You probably speak English for 20 years too
fricking esl ape lmao
>¡Ay, naranjas en la cabeza!
lmao
This.
It's convoluted because you chose it to be so.
are you on windows? just use visual studio community
yes
that you need to install one thing then one thing then one thing then one thing
and it maybe works
So you're saying it's not vscode that's the problem but your compiler?
I'm saying setting up a whole dev environment for C++, also using other libraries on frameworks, is the most convuluted process I've seen in any modern language
why do you guys autist out over hurr durr just install exactly this program 1 time
no professional works like that
A build system is orthogonal to the language.
>Are you stupid anon? Of course you need to use this specific editor (we can't even agree on which though), and obviously you have to manually configure your build system. Oh and you expect it to work on all major desktop platforms? That's ridiculous. You have to dev on X with XY setup and tools.
Meanwhile all real languages like Go, Rust, Zig etc just work by default with no tinkering, everywhere. No wonder that the C/C++ ecosystem is making no progress at all and all new interesting software is made in other languages. It's because C trannies spend all day tinkering with config files and IDE extensions, and arguing on IQfy that it's actually impossible to make a language that actually works.
I would do the same with all those languages as well.
>real languages
Appeal to purity, moron
>new interesting software
Like what? Does anyone use it?
kek based
I still don't get so many IQfygays are obsessed with C/Cpp beyond small performant modules only when needed
they are objectively worse languages and make you do more shit. just pick a high level language to express your intention easier
Should be using Visual Studio not VScode buddy
what does this even mean?
Your mistake is "trying to make C++ work in <text editor". Let me guess, you're a Windowsgay? You need to use a build system like GNU Make, CMake, or Meson, and write a config for that. This has nothing to do with your text editor.
but node works fine
i mean compared to that or python for example or even java
doing C++ on windows means getting visual studio the IDE, not the VS Code text editor. windows is not complicated anon 🙂
and if you need 3 hours to set up that shit on linux, just give up.
i already had VScode, so I thought why not just add it
is vistual studi free?
you need to configure vscode to understand it also
select a compiler
then build it and so on and so on
it's not hard per se, just a big convuluted process
homie just type "make" on the commandline. Maybe go the extra mile and cmake .; make
what the actual frick is wrong with you gui troony cattle
you don't have to install the whole ide anymore, but the amount of shit you still have to download is obscene
Doing C++ on Windows means installing MSYS2 and VS Code. There is no need for an IDE.
this is the correct answer. Cpp on windows is as easy as it gets , installer will do it all for you, just tick the box for cpp
same experience, took me a whole day trying to figure out how to get the damn thing to work. I must say I haven't used c++ or c for that matter in over 10 years but still.
the worst part? I already forgot how I did it
install the extension and run from terminal? what's hard about this?
Are you using windows? Just use just werks OS like mac or linux
Windows is cancer for C/C++, use this https://www.msys2.org/
How to write a Makefile: https://www.softwaretestinghelp.com/cpp-makefile-tutorial/
>just make your computer become linux
frick no. if you need gcc(garbage c compiloooor) then just save mingw on some folder and add the bin folder to system 'path' variable
the absolute state of windows "devs" lol
MSVC>garbage system 2
>gcc(garbage c compiloooor)
HAHAHAHA HAVE YOU SEEN MSVC
Not once I have got fricked in ass by using MSVC. Always I have got fricked in ass by GNU C. Why? Well, guess what: windows systems are not GNU project native so GNU has own quirks in replacement.
ESL
I've ran into some obscure bug with MSVC's C file IO calls a few years ago (win10). Randomly, it would fail to read a file in binary mode. I thought I was going crazy, but the same code ran perfectly under MinGW. The only hint on the entire internet was hidden in a single stackoverflow comment expressing the same exact situation. I wouldn't trust that shit for C++.
um actually gcc stands for garbage compiloooor collection
thats what I finally did yes
VSCode isn't some black box that will magically compile for you. Choose a build system, get it to work OUTSIDE of VSCode, then either write a minimal tasks.json file or get an extension to integrate your chosen build system into the editor. Or, you know, just use the built in terminal.
>literally proving my point
>guys why isn't notepad compiling my code correctly >;(
Why isn't the gcc compiling it correctly? What's his problem?
thanks again for proving my point and being obnoxious
literally any other language except maybe perl is easier to get running than C++ on windows, and I am now also trying with the boost library
LMAO, just install MSVC community edition, or Mingw64 if you want to use GCC. Is EZ AF.
see
>$ cmake -G "Visual Studio 17 2022" -A x64 ..
>bash: cmake: command not found
>Download a compiler of choice
>Add to path
>Use one of the 10 million C++ extensions
Wow so hard anon
funny how everyone says it's easy but yet to give a detailed guide on how to do it and instead just gives vague answers.
maybe it's not so easy after all
main.cc
#include <iostream>
int main() {
std::cout << "Hello World!n";
return 0;
}
g++ -o hello main.cc
./hello
Easy as. Now if you want to have it automated:
https://www.softwaretestinghelp.com/cpp-makefile-tutorial/
compile this (xbox360 controller shutter)
#include "windows.h"
#include "xinput.h"
#pragma comment(lib, "XInput.lib")
int main(int argc, char *argv[])
{
HINSTANCE hXInputDLL = LoadLibraryA("XInput1_3.dll");
if (hXInputDLL == NULL)return 1;
for(short i=0; i<4; ++i)
{
XINPUT_STATE state;
memset(&state, 0, sizeof(XINPUT_STATE));
if(XInputGetState(i,&state)==ERROR_SUCCESS)
{
typedef DWORD (WINAPI* XInputPowerOffController_t)(DWORD i);
XInputPowerOffController_t realXInputPowerOffController=(XInputPowerOffController_t) GetProcAddress(hXInputDLL, (LPCSTR) 103);
realXInputPowerOffController(i);
}
ZeroMemory(&state, sizeof(XINPUT_STATE));
}
FreeLibrary(hXInputDLL);
return 0;
}
I don't haven an xbox controller.
it does not matter. it sends shut down signal up to 4 controllers. it does nothing bad if you don't have even one. Compile it. If you can
do you not know how to pass include dirs and dynamic lib locs to your commandline?
is this your CS101 homework
but it's different for every compiler
its the same for clang and gcc
what other compilers matter?
Nah, It just happens that I have xbox360 controller on PC. Now can you do it? This is more like real life enviroment scenario outside fizz buzzing to CMD
I hate cpp as much as the next guy cause its shit (same as rust) but this is a Windows problem not a cpp problem
you're trying to build something that requires specific windows libraries and you don't know how to provide them. Check microsoft documentation or contact them for support, your issue has nothing to do with cpp in general
How are they supposed to give detailed answers to a totally vague OP? What knowledge does OP already have? Does OP have a preferred build system? Someone could write a Makefile or a CMakeLists for you but that's not gonna teach you how to actually do shit yourself and without a bit more info nobody is gonna be able to do that.
thanks for proving my point again 🙂
>open VSCode's built-in terminal
>make
???
yeah that doesn't work at all
have you tried writing a Makefile first
of course not
i shouldn't even have to
I'm glad we're not hiring zoomers anymore lol. Your generation is utterly useless. LLMs are a net improvement.
HAHAHAHA
Absolutely braindead take.
>i shouldn't event have to
Then who will?
it should already do it by default
why should i need to configure anything at all
Any sort of real-life software development that isn't CS homework would require writing build files, be it for make, autotools, cmake, or meson.
that's nonsense
i highly doubt anyone is doing that outside of their basements
i guarantee nobody working a job has to do that
you clearly have never had a serious software development job
webdev?
it does not need any file. i compiled it on gcc. but not without other Anon's help.
gcc [WHAT HERE?] main.cpp [AND HERE?]
That's just for one file. If your program has multiple files, you will want to use a build system. Of course it's possible to compile a multi-file program by hand, but that's stupid.
it's just 25 row script, anon
25 rows too many and 1 script too much
>25 row script
If only there existed tooling and scripting languages specifically for building software...
Don't tell him about unity builds
>C++ gays actually believe this
>the idea of a language with a default build system that works without tinkering is completely beyond their grasp
>C++
>language with a default build system
I can't tell whether he's actually moronic or it's just really shit bait anymore.
I'm having trouble parsing your posts, they might be a bit too moronic for me. Are you saying that C++ doesn't have a default build system? That's what my post was saying as well.
Good languages have a default build system that works, so you don't have to waste time on irrelevant tinkering.
>Are you saying that C++ doesn't have a default build system?
Yes moron.
>Good languages have a default build system that works, so you don't have to waste time on irrelevant tinkering.
No. This is an exception rather than a rule. A language at its core is really just a specification. E.g. ECMAScript, C, C++. None of these come with build systems, because they're just specifications. Rust/Cargo is an exception here. Interpreted languages don't come with build systems because they're not built.
C/C++ is a systems language, there is no one way to build C/C++ programs. Setting up a build system really isn't that hard if you know what you're doing. Arguably using Windows to learn it is shooting yourself in the foot.
>there is no one way to build C/C++ programs.
You keep repeating these things as if we don't already know them, but it looks like you're not thinking about them critically. Does it HAVE to be that way? What's the benefit?
>Interpreted languages don't come with build systems because they're not built.
The real world proves you wrong, C++ is almost always built. Examples in this thread:
>Setting up a build system really isn't that hard if you know what you're doing.
Again, what you say has no connection to the real world. Setting up a build system adds an incredible amount of complexity to C++ development, from the hobbyist spending hours trying to compile a simple Qt program on Windows, up to pic related.
>Rust/Cargo is an exception here
No, it's not. All "new" languages like Golang and Zig are going in the same direction: a single tool distributed with the compiler that makes all code and dependencies Actually Just Work with one command.
It's an idea seemingly so obvious that it's kind of unbelievable that I have to argue about it. Even C++ libraries like SDL3 are finally realizing how bad the situation is and are doing their best to just work with as little interaction with the build system as possible. (https://cohost.org/danielg/post/627154-in-sdl3-sdl-main-wi)
languages don't come with build systems because they're not built.
>The real world proves you wrong, C++ is almost always built. Examples in this thread:
(You)
(You)
>interpreted languages
>C++
...
You got me, you successfully confused me by bringing up interpreted languages for no reason even if nobody was talking about them. You still know what I mean in the rest of my post though.
>just write some obscure makefile
Why visual studio can understand everything without it? Why MSVC just works?
yes then you neede some mingw32 library
link it to the PATH
restart vscode
restart terminal
export PATH
do some build setups so the libraries work
and so on and so on
again, not saying its HARD just damn complicated
Oh no, I have to add some shit to PATH in Windows. That's going to take all of 2 minutes in the fricking control panel.
All I should need to do is click file - use C++
that is it
if anything more is needed then they have failed
i should not have to create make transform define anything at all
gcc in text editor: make make makefile. What should be written there? who knows.
microsoft visual C in microsoft visual studio: just press the play button
You are literally making a case for why no one should ever hire you by putting your gross ineptitude on display. ESL to boot too, kek.
Just use win64devkit
https://www3.ntu.edu.sg/home/ehchua/programming/cpp/gcc_make.html
>The linker searches the so-called library-paths for libraries needed to link the program into an executable. The library-path is specified via -Ldir option (uppercase 'L' followed by the directory path) (or environment variable LIBRARY_PATH). In addition, you also have to specify the library name. In Unixes, the library libxxx.a is specified via -lxxx option (lowercase letter 'l', without the prefix "lib" and ".a" extension). In Windows, provide the full name such as -lxxx.lib. The linker needs to know both the directories as well as the library names. Hence, two options need to be specified.
What the frick is the gcc linker's problem? Why you need specify the link like this
gcc -lXInput main.cpp ---
Why it just did not search for it? What the frick is wrong with this ancient unix shithole?
>Why it just did not search for it? What the frick is wrong with this ancient unix shithole?
Because there's often different libraries that define the same symbols.
Then we come to the point why there was no error message?
There's no need to do all of this yourself, you can use pkg-config.
e.g. use this to get the flags and libs for libsoup:
pkg-config --libs --cflags libsoup-2.4
i will never install msys2 to my precious computer.
Why Microsoft Visual Studio searches depencies from almost everywhere and even if it fails, then you can just add the missing path from a human usable menu? Why GCC cannot search from paths that it already knows? it still needs to be linked manually
https://stackoverflow.com/questions/335408/where-does-visual-studio-look-for-c-header-files
You are comparing Visual Studio (a graphical IDE which allows graphical management of project configuration) to GCC (a compiler). To give a fair comparison, try comparing gcc to cl.exe instead and see how far you get with trying to specify custom include directories to the latter.
Or just compare Visual Studio with another IDE which allows you to configure stuff instead of comparing it with a bare command line compiler that needs everything to be specified to it (which is the job of the build system, usually included in an IDE).
cl.exe won't let you shit your own bed, and thus is only callable from visual studio promptline. it also seem to link just fine and needs explicite /c flag to not.
https://learn.microsoft.com/en-us/cpp/build/reference/compiler-options?view=msvc-170
If you want to use GCC and windows, I too seriously recommend a proper IDE and that would be the Eclipce C IDE
>cl.exe won't let you shit your own bed, and thus is only callable from visual studio promptline
this is not remotely true, you can run cl.exe from any windows terminal
people do it all the time for msvc builds for projects that aren't VS projects
>https://code.visualstudio.com/docs/languages/cpp
>just press build and run, goy
>what do you mean i did not include the XInput.dll?
>this one webpage must work!
https://marketplace.visualstudio.com/items?itemName=formulahendry.code-runner
1.4 billion indians can't be wrong
Well then just install cmake.
but... some posts above it was just to install exactly 1 program ?
Said who?
this for example
MSYS2 not strictly a "program" per se, it's an environment that can install other software. Also in MSYS2 you typically uses pacman to install packages (similar to Arch Linux).
I think it's vcpkg that needs CMake here.
vcpkg is such a fricking scam
I think it worked only once out of the dozens of times I tried to get a library working from there
but it was just to install one(1) command everyone else said here
Use code::blocks, it comes packaged with toolchain on windows. Or install MSYS2 or whatever is it used on windows these days.
shitty docs. people cannot document shit. Try compiling beeflang next see what a mess that is if you don't have llvm.so.13 saved as llvm-13.so.
>cmake command not found
cmake is cancer, try xmake.
you don't need vcpkg either because xmake can manage dependencies.
>xmake
>lua
How the frick have you messed up vcpkg. It does everything for you lmao
>*write C++ code*
>oh, I need to build it, gonna use that cmake thing
>*runs cmake*
>EH ERROR
>ops, I probably forgot to install the compiler
>*runs cmake*
>EH ERROR
>wtf, man, everything is installed fine
>*waits 3 years until ChatGPT is launched*
>damn, this AI thing is great, i'll finally learn how to compile a C++ project
>*asks help to chatgpt*
>oh, cmake isn't actually a build system nor a compiler, I'll to install this ninja thing
>*hello world compiles*
>cool, now I'll compile Godot
>What? Why do I need to install all those other softwares to compile that shit?
The average C++ dev life.
>What? Why do I need to install all those other softwares to compile that shit?
>The average C++ dev life.
The average Windows experience. When you don't have a package manager to install libraries.
you didn't even have to set it up if you used Xcode
it just werks out of the box
>Type up C++ code in VSCode
>Alt tab to your terminal
>g++ -o blah.exe *.cpp
I don't understand how this takes 3 hours.
>VScode
Found the error.