I've been using Codeblocks following tutorials online. I wanted all my files in a single place, easily accessible for future reference, but it's dawning on me that IDE's are too unreliable?
VISUAL STUDIO:
1 - Hideous file structures. No problem create a template. Then you read that projects created by templates are unreliable (Visual Studio's own documentation).
2 - Renaming projects/ solutions is a pig!
These 2 are fundamental aspects of an IDE.
CODEBLOCKS:
I was doing fine for around 40 tutorials but have now lost 2 days due to a linking error "undefined reference to std::ostream::operator". There's nothing wrong with my code, it's suddenly magically forgotten how to output a line of basic text lol.
there is a very large world between 'useless' and 'subpar'. All IDEs have annoying 'features' and flaws. That does not make them useless. Renaming projects ... I can't recall needing to do that. Visual is still one of the few clean wysiwyg gui editors for the gui elements.
My take on it is that it depends on project size and features. I will not code gui programs without an IDE. And its really not useful to try to do giant, unreadable and unmanageable thousands of files involved makefile chains. That said, most of the c++ I have done in the last couple of years have been monolith console programs, very small programs for personal use to do job faster/easier. I use notepad ++ for it, and its all I need.
lost 2 days due to a linking error "undefined reference to std::ostream::operator".
That's a compile-time (well, linker) error, not an IDE error. You would get the same error if you ran the equivalent commands on the command-line.
Don't get me wrong, sometimes IDEs are overkill. Code Blocks is sometimes annoying to work with, and when I rename projects I usually just end up editing the XML/project files, whether it's Code Blocks or Visual Studio.
That's the strange thing Ganado, I was able to intermittently run these files.
I had a MSYS62 (similar name) compiler installed separately for my virtual machine to enable Linux terminal commands. I don't think that was the issue as I was using this for over 40 tutorials without issues.
But I had another MinGw compiler installed to disk. This may have been conflicting. I've deleted both of them & I'm working ok again (not sure for how long though).
I would like to use VS but not being able to rename projects & solutions easily is stopping me atm.
Sometimes friction between user and software occurs because the user is trying to use the software in an unintended way. Why do you need to frequently rename solutions or projects?
Because I'm dumb, & don't get it right first time.
EDIT - In all seriousness, there's always going to be changes; if you're writing anything that's not a simple function. Once you start writing a few external procedures things get complicated quickly & there's always going to be changes.
The name of the solution or project should be fairly low priority, though. How often do you need to rename a project that it stops you from adopting an IDE?
The final name for any commercial project is rarely known at the start. Developers use a "code name", meaning any name suits give them to work with, until marketing figures out how they'll brand and ship it.
You should do the same: any temporary name you like will do. When you are finished you only need to change a few strings and recompile, then rename the resulting executable.
The trick to remember is that there is no dissonance here. The development name != deployment name, and this is normal and need not trigger your OCD.
Also, be careful not to assign failure to your tools when said tools work fine for literally millions of developers worldwide.
All it means is you need to learn more about using the tools effectively. It is a bit of a learning curve, which is admittedly difficult to surmount when OCD has you in its grip. Redirect the OCD to the learning process, expecting some projects to fail as a total mess -- lack of such results should trigger the OCD as something is wrong.
Thanks Duthomhas, am I honestly the only one who thinks that an IDE not being able to handle renaming of directories ridiculous? Seems that VS isn't greatly popular though:
am I honestly the only one who thinks that an IDE not being able to handle renaming of directories ridiculous?
What exactly are you trying to do? If you try to rename the directory of a project willy-nilly without updating the solution file, of course that's not going to work. VS needs to know where to find project files. What would be the alternative? To have it scan the entire subdirectory tree looking for absolutely any file that might conceivably be a project file? Then you'd be complaining that it takes too long to load solutions.
Seems that VS isn't greatly popular though
"There are only two kinds of [software]: the ones people complain about and the ones nobody uses."
-Bjarne Stroustrup
(He said it about programming languages, but his quote is perfectly extensible to other domains.)
You don't need to apologize. Microsoft is not going to take offense and no one here has an emotional investment on Visual Studio. If we're trying to get you to reconsider it's because we think VS is a useful tool. If you choose to disregard that advice for inane reasons it's your loss.
Thanks, I'm in Codeblocks atm but I'm definitely going to take your advice & get into Visual Studio when I complete my basic tutorials & get into the GUI tutorials.
@Dalski, if you want to rant please do it in the Lounge. :)
I have several different compilers/IDEs installed. VS2017 & VS2019, Code::Blocks (20.03), DevC++ 5.11 and MSYS2. MSYS2 is the only stand-alone command-line compiler, though it is possible to do command-line compiling with the IDE compilers.
I dabble on occasion with command-line compiling as a hobby of a self-taught hobbyist programmer.
Why so many compilers/IDEs? So I can test code between different compilers. Some times C++ features available in one aren't available in another.
For instance, std::random_device. Should be a true random device available since C++11. MSVC it works as advertised. I check the entropy on an instance. And use a test uniform int distribution repeatedly to see if random numbers are being generated.
C::B, same tests and every program run I get the same output. Not good.
A benefit of being a programmer is that if something doesn't work the way you want it to you have the option to write your own tool that can perform the desired tasks for you...It can't be that difficult to start of new project with the desired name and make a tool that moves the relevant files to the desired locations (even rename them). I'm sure if i was that worried about it i could even create a small script that could automatically add the relevant files into the new solution. Or even Keep the existing sln and just have the tool rename the files, directories and do whatever file swapping to get the sln back to working condition.
Idk if i'd use c++ to make such a tool, but a language designed to automate windows tasks like autoit. Piece of cake.
Hideous is in the eye of the beholder, naturally. Personally I find the file/folder structure rather useful because it separates out debug and release executable files as well as x86 & x64 exes.
YMMV, of course.
With Code::Blocks I'd have to modify a lot of settings to be able to what I can with MSVC with a couple of check box toggles. And still have to build each type of exe separately AFAIK.
Fedora
• GCC 8 (yeah, I know I need to update)
• Clang-9 (GCC toolset)
I do not have current access to a Mac, so no OS-X stuff...
It is not too difficult to move stuff around in a VS solution, there are only few places in the project/solution files that need updating, but... don’t do that!