#Any books that cover GCC?
36 messages · Page 1 of 1 (latest)
When your question is answered use !solved or the button below to mark the question as resolved.
Remember to ask specific questions, provide necessary details, and reduce your question to its simplest form. For tips on how to ask a good question use !howto ask.
Have to ask. Do you think C will be wildly different with gcc?
When compared with other compilers, I mean.
There will be very niche differences, like some headers only being available on POSIX systems and vice versa.
But these headers fall outside the C standard anyway, and I doubt that any book on gcc - if one exists - would go into detail about these headers.
After all, you can compile with gcc on Windows too.
I actually today had issues with an old book that was actually for MS-DOS
My code would not compile because of some issues
My book told me to void main{
return 0;
}
That was wrong
It didn't compile
Are you sure it was just
void main{
return 0;
}
And not:
void main() {
return 0;
}
Okay, this is not per sé about gcc.
This is probably more about how "permissive" Microsoft compilers worked back in the day.
Also my compile freaked out at getch();
So your question is legit.
Even though it doesn't need to be gcc specifically.
Also, the book told me to #include <conio.h>
It also returned error of non existence
So I started studying C by YouTube Tutorials
Okay, I actually found a book that doesn't get into weird situations.
Close that other book, for sure.
Yeah
I can also use YouTube Tutorials for a bit
Seems like C has changed. It's not the same for every system ever
Well, yes and no.
Function main() always returned an int.
But the standards have indeed evolved over the years since that book of yours.
Stick with gcc as you set out.
But consider turning on compiler warnings to help you stay within standards.
Example:
gcc main.c -Wall -o myapp.exe
See this: https://godbolt.org/z/M8c58veca
If you remove the -Wall option, then you will see that even gcc is permissive.
Reading the above it seems like the OP is more interested in an overall tutorial?
If thats the case this server has an incomplete one somewhere
https://github.com/TCCPP/wiki found it
As for actually learning C - I suggest picking up a book or a good (paid) course. I, personally have yet to see a good YT tutorial (of C) yet
I mean you should start with using books that are less ancient :)
on the other hand even ancient K&R one would work, although needing -ansi to gcc
there exists a free GNU book on C, I'm not sure how bad it is: https://www.gnu.org/software/c-intro-and-ref/manual/c-intro-and-ref.pdf
it is specifically on C and gcc
for sure the book uses a horrible gnu way of formatting of C source, which comes straight from hell :P
Terry A. Davis get's a phone call video
you cant return a value when its void
oh mb it wasnt you