I was trying to compile some apps on my pi, and noticed that the OS has a C/C++ compiler called gcc. However, I haven't been able to find good documentation for what commands there are, and I'm not very experienced with C in the first place (never successfully compiled own project from scratch). Does anyone have good advice or links to sites about how to get started with it?
GCC is probably the most common C compiler used on Linux (followed by Clang) and other open-source systems. It is comprehensively documented, but if your question is intended more along the lines of "how do I write C programs to run on Linux?" then the GCC documentation isn't very relevant. In that case you're better off starting with something like this introductory lecture to get you started on programming for Unix-like systems.
Thank you very much for the helpful links. I was more interested in the practicality of writing C programs that can display images to the screen, since I am familiar with how C works, but less familiar with how to actually get it to do the things I want (which mostly include graphics programs), instead of just printing to the terminal.
If you specifically want to do graphics (and perhaps game-like programs), a good starting point would be to try using either SDL or SFML. Graphics programming is usually very specific to a given OS, so it's usually best to use a library like those to abstract away platform-specific details that aren't very interesting.
I would also second SDL (specifically SDL2) and if you want to do more "widget" (i.e. buttons and check boxes) programming Qt is a nice cross-platform solution but can be not as nice as natively-built applications using GTK3 or similar.
  
Register to Join the Conversation
Have your own thoughts to add to this or any other topic? Want to ask a question, offer a suggestion, share your own programs and projects, upload a file to the file archives, get help with calculator and computer programming, or simply chat with like-minded coders and tech and calculator enthusiasts via the site-wide AJAX SAX widget? Registration for a free Cemetech account only takes a minute.

» Go to Registration page
Page 1 of 1
» All times are UTC - 5 Hours
 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

 

Advertisement