5 ms·
> Setting up cmake, or make, or the autotools on Linux, or setting up cmake Don't do this to yourself, just stick with regular Visual Studio and its build syst
by Tomis02 9y ago
> Setting up cmake, or make, or the autotools on Linux, or setting up cmake
Don't do this to yourself, just stick with regular Visual Studio and its build system. Nowadays you can even use it to build Linux binaries, so why put yourself through the hassle of using stone age text files to configure your build when Microsoft has been providing a perfectly usable solution for almost two decades?
https://www.theregister.co.uk/2016/03/31/microsoft_visual_studio_c_plus_plus_for_linux/ https://www.theregister.co.uk/2016/03/31/microsoft_visual_st...
- z0r 9y agoWhile it's not representative, the last time I touched Visual Studio was to work on fixing bugs in software that had to be deployed to an Xbox 360. Let me tell you, the process for that involved nasty build settings and a small constellation of batch files and it was not especially usable. Text files aren't "stone age", they are the past and I would always bet on them being the future.
- Tomis02 9y agoWithout knowing the specifics of your software I can't really tell if the problem was with Visual Studio or the process itself. I do believe you can have a shitty work environment whatever you use, and that some tools aren't good for every job (and that includes Visual Studio). > Text files aren't "stone age" The issue is whether your build system provides you with an UI that enables you to be productive (e.g. Visual Studio), or if it forces you to manually edit some configuration files using some arbitrary syntax that doesn't seem to display any sort of internal logic (e.g. CMake). In this respect, being forced to deal with text files is stone age, just like debugging a C++ program with stock GDB. In the end, it's a matter of preference. Do you want an IDE so that you can focus on programming, or do you want to set up and maintain a string of loosely coupled tools that, when the stars align, do what you want to.. kind of.
- slavik81 9y agoThe Visual Studio options menu is an abomination of a GUI. The things you need to change to do any particular task, like integrate a library, are scattered around multiple different pages. It's also very easy to screw things up, so that only debug or only release mode work properly. I lived the pain of hunting for binary downloads that match my exact Visual Studio version. Even if you were lucky enough to not need to compile from source, you'd still need to manually configure each library and include path for both debug and release mode separately. And, when you later move the project onto a new computer or share it with a friend, you're likely to discover that hidden somewhere in that mess is a path that's no longer valid. By comparison, adding a library on Linux is usually trivial. Call 'apt install foo', call 'FindFoo' in your CMakeLists.txt, and use the variables FindFoo provides. Done. The Visual Studio debugger, Intellisense and plugin integration are great, but project configuration is atrocious and nobody should be emulating Microsoft's approach on that.
- Tomis02 9y agoI agree. Been there, done that. Not fun.
- sqeaky 9y agoI have never had visual studio "work right" it always tried to compile my stuff as C++/CLI, force linking against libraries that weren't needed or just didn't have the core language features I needed. Is there a simple flag to statically link the stdlib yet? Did they get rid of the crazy errors in the std lib when building with /w4 yet? I could on with gripes forever... My life got so much when I just worked in Linux, then used CMake to hide all the visual studio grossness. My software all still builds over there and my unit tests still pass, but I get an environment that works and is understandable. I started with visual studio too, I never understood what the hell it was doing or why, there was always one more corner case or one more confusing exception to a rule or one more thing that wasn't standard C++ but msvc wanted. I think windows and visual studio was designed to be impossible to understand intentionally, and this gets confirmed every time I ask some MCSE or or other cert holder "why" or "how" to some specific feature. I am fine with them not knowing, but they don't even know how to look it up of use technical tools to inspect it. With any other OS it is pretty easy to follow technical stuff all the way down to the bare metal and back up if that is what solving a problem takes and you can do this through the documentation or through the inspection tools like debuggers profilers. I have tried with MSVC on windows and get blocked the first time some "feature" I have never heard of and didn't ask for gets in the way. Now that understand some of what the older versions are doing I still don't understand why they do it, there is no clear technical reason to do much of the non-sense they do. One last gripe, why does the installed thing fill like 20GB and take an hour to install when QtCreator, gcc and clang takes 3GB with all their dependencies and like 2 minutes to install from apt-get?
- Tomis02 9y agoOP mentioned an environment to learn C++. Having to additionally learn a build system is cumbersome at best, whereas Visual Studio provides all the right defaults for most use cases - especially good for beginners. > it always tried to compile my stuff as C++/CLI, force linking against libraries that weren't needed I'm pretty sure you can change these things in the project settings. > just didn't have the core language features I needed Each new version of Visual Studio usually includes new core language features, just like gcc or clang or whatever. > Is there a simple flag to statically link the stdlib yet Yes, I think it's been there for a very long time (just switch the runtime library to "/MT" if I'm not mistaken). > Did they get rid of the crazy errors in the std lib when building with /w4 yet? I don't think remember anything out of the ordinary when using /W4; when using /Wall you do get indeed lots of warnings, but that's because it activates some sort of static analysis that is most of the time overkill. > My life got so much when I just worked in Linux, then used CMake to hide all the visual studio grossness. Funny, for me it was exactly the opposite. For every checkbox and textfield Visual Studio provides as a simple option and/or toggle, there's an equivalent horrible CMake configuration line (or, more common, set of lines in multiple CMake files). Because when I'm busy plowing through a huge C++ codebase, all I need is worry about the syntax and state of my CMake scripts. > With any other OS it is pretty easy to follow technical stuff all the way down to the bare metal and back up if that is what solving a problem takes and you can do this through the documentation or through the inspection tools like debuggers profilers. Easy to say, except that in practice, when you're on a deadline, all that source code becomes most of the time a liability. When you're trying to understand why this CMake script doesn't do exactly what you want it to do, are you actually going to start debugging it? It's probably a better option than reading its very poor documentation, but still. > One last gripe, why does the installed thing fill like 20GB and take an hour to install when QtCreator, gcc and clang takes 3GB with all their dependencies and like 2 minutes to install from apt-get? I think you can customize your installation to take less than 20 GB. I don't know why the big size compared to other compilers/environments, but to be honest it's not really a big issue for me. When looking at the bigger picture, I waste an extra 5 minutes installing the environment but I win a huge amount of time by not having to be bothered with the build system, compiler options and other minutiae (unless I explicitly want to). If you have a specific use case that makes it difficult for you to use Visual Studio I sympathize, but overall, having used gcc/qt creator/eclipse/whatever, Visual Studio is a one-size-fits-all solution that made my life easier than the alternatives.
- 0xfeba 9y agoBut what about configuring additional libs in VS, or autoincrementing the version in the resource file? Or when you import and very old VC++ project and the auto conversion process only sort-of fixes things? That's what I'm talking about. VS works great out of the box using the Wizard, but the learning curve gets real steep right after that.
- Tomis02 9y ago> But what about configuring additional libs in VS I'm not really following. Just add the other library's project to the solution? > or autoincrementing the version in the resource file There are probably multiple solutions, but off the top of my head you can add pre/post build steps to a project, so you can invoke a script that will autoincrement the version for you. > Or when you import and very old VC++ project and the auto conversion process only sort-of fixes things? I agree, this sometimes causes problems. When that happens, creating a new project from the existing source code can be better than trying to fix the imported project. > VS works great out of the box using the Wizard, but the learning curve gets real steep right after that. As far as IDEs go, I feel VS is tolerable. I agree there is a learning curve once you start customizing your project, but in my opinion it's not as steep as it is in Eclipse, for example.