serialShinobi wrote on 2024-04-24, 12:28:
I was specifying the compiler I had in mind so that you and other programmers would know which one I had in mind. I thought it might unearth insights about my situation and how to proceed. But otherwise your right that learning to program in c on a PC isn't important. Its just both windows and Linux are complex systems. Desktop Linux distro like Ubuntu usually have better documentation and others like Linux/it's popular in the development community.
As been mentioned, C is a language standard and so is 'fairly' platform agnostic. Compiler nuances only become relevant when you start delving into different macros and sometimes some behavioural difference, although not so much these days. Platforms only become relevant when doing system stuff outside of the application you are writing mainly wrt to filesystems (e.g. where to find config files, posix, GUI frameworks etc). When you know one platform, it's fairly trivial to apply to another.
The documentation you speak off sounds like it's more for the OS, not API? There isn't really an API for linux (other than POSIX) as it's distro dependant (although there are some standards for kernel file locations/contents etc). Theres plenty of documentation on Windows API if you do need, but tbh at first you won't need to be going anywhere near this stuff. (Also note, linux becomes distro centric outside anything beyond the terminal/console, so suddenly you are in a world of frameworks and libs which more often then not are not platform dependant anyway).
serialShinobi wrote on 2024-04-24, 12:28:
MSVC got the best debugger environment available for noobs 😀 and its fully C conform without any specials
I am open to trying MSVC but I feel that GCC is something I can use for learning purposes. That's a purpose where I can catch on to things like the memory or the heap or pointer calculations, things you mentioned earlier. I need to be able to view things like that to change my circumstances of not understanding those things. I think GCC will reveal the computer organization and architectural details - the design of the system being programmed.
I agree with llm, Visual studio debugger is the best out there, more importantly for you it is visual and allows you to step through source code easier, examine containers, memory contents etc much easier than gdb.
gcc is not a debugger, only a compiler. Easiest way to debug on linux is via gdb, but this is not 'visual', it's entirely terminal driven and although you can view source code snippets with ease, more often then not this is limited in scope and you are constanly scrolling back and forth so personally I find having to have an editor open and constanly cross-referencing source file lines with gdb. Breakpoint management and memory usages/footprint is also a hell of a lot easier in VS. In terms of pointer arithmetic etc, it's what is says and no different between the two, mem addresses and values are presented the same textual (HEX) way. Stack frames can be viewed (again terminal driven with gdb, expandable lists in visual studio), pointers will be presented mainly as hex and perhaps having a scientific calc at hand to convert hex to decimal might be useful. Again, in visual studio this is all kinda done for you. All in all VS is just easier on the eyes and much easier to navigate when debugging which would get you going much faster and allow you to concentrate of learning the skills of programming quicker. It's more intuative...
serialShinobi wrote on 2024-04-24, 12:28:
I love to have documentation (prefer books) for the exact compiler I am using. One day I won't care so much about the compiler. For now the feeling is nice when they are talking about a project, the source and other files, that is made for the compiler I'm using. An IDE can become unwieldy depending on the documentation you have. Some is written for an audience that wants to program at a paid expert level. And the situation can be different with IDE specific docs - written very clearly for people who need to do something simple.
Many IDE's will simplify the whole build process for you (hence the ancillary project files), without it you will have to manage your own areas for compilation and linking which may be difficult at first in that you may end up creating a lot of build scripts (some of the compiler command line arguments can get quite long) or end up just using makefiles (make/cmake), which tbh is probably a good thing as there is a lot more to programming than just writing source code. Tool chains and understanding the build stages is as (if not more) important than knowing how to write source code.
Compiler errors are generally fairly self-explanitory, linker errors on the other hand... not so. Many IDE's will go some way to making these linking errors somewhat more digestable.
Good luck!