Home Home > 2013 > 10 > 07 > openSUSE and GCC part 1: getting started
Sign up | Login

Deprecation notice: openSUSE Lizards user blog platform is deprecated, and will remain read only for the time being. Learn more...

openSUSE and GCC part 1: getting started

October 7th, 2013 by

I try to explain in this series of blog entries how to install gcc (GNU C-Compiler) and what to do with it. I  also try to explain little make and CMake/Autotools. This is not very generic tutorial because I like to promote openSUSE as coding platform. Most of the tips goes just fine with every distro. For the first words I like to say one thing: openSUSE is excellent platform for C-coding. Though, you can choose your programming language  but this time I like to talk about GCC and specially C-Compiler. I’ll try to how to get there with these writings because I have noticed that this substance is getting less attention that it needs. Also noted that GCC anf GNU is 30 years and I have used it almost 15 so time to share some information.

openSUSE and Linux

This is for first timers with openSUSE and GCC not people who know how to use YaST and openSUSE. If you understand openSUSE is Linux-kernel based RPM application distribution in common language openSUSE is Linux operating system you shouldn’t be reading this it’s just waste of your time. If you are still reading you should understand  in deep openSUSE is GNU/Linux based operating system but let’s not get in to that battle.
So One can think Google Android as Google/Linux distribution (It’s also Linux say what you want). They took some tools from normal Linux distributions (there are common tools like GCC) and made rest from the scratch. Is it better or worst you have to choose that from you point of view.
If you come from BSD world for example Mac OS X or FreeBSD and have done some object-C or C (with or without command-line) you don’t have to forget everything just keep your mind open. If you popped just from Microsoft Windows world thought ‘hey I’ll start developing Linux/Android/Cross-platform apps.’ you REALLY have to keep you mind open. Hey I was on Windows decade a go and I’m still alive in Linux world in base Microsoft Windows is POSIX standard compliant like Linux.

Command-line (CLI) and Graphical User Interface (GUI)

All I’ll cover in these blog posts are Command-line examples. If you want to use IDE (Eclipse or such) go a head but I’ll like one to understand how everything really works. You don’t have to dream like those machines about cosmic electric sheeps to understand command-line. You can get there also in Microsoft Windows world and you don’t have to ever get there in Linux if you don’t want to. I’ll just feel little bit safer if you or me understand how to install and compile applications on Linux with command line. I won’t explain to you what is command-line (CLI) and how to get there from GUI (Graphical User Interface) where you probably are reading this from you browser please surf to read the Wikipedia article about it. If you didn’t understand anything what I just said you can blame me and take a break.

Install GCC on openSUSE

I assume that you have installed openSUSE. If not download and install version that have GUI. Do it if you aren’t PRO or have some very very very very good reason (like running it on virtual machine top of Windows then VMWare and Virtualbox are you way to go. Qemu works but you have be again very open minded).
But now you have running openSUSE system with nice KDE/Gnome/XFCE4/LXDE GUI look and If you were hacker you installed all you needed stuff when you installed openSUSE to hard drive. If you like me and didn’t keep reading. In openSUSE you can manage everything with YaST or you can choose the red pill and see the true world.

YaST way

open YaST from application menu. You find it there just look for Yast2Logo under settings. Type in root password. Choose ‘Software Management’. Now you can just type ‘gcc’ in ‘Find:‘ box. I’ll just assume you install ‘gcc‘ by clicking box (there comes green right mark) front of it and then push Apply. It’s easy as that. Now you have C-compiler (no C++ or ADA) but no auto-tools or make (or Cmake/Scons).

If you are on CLI you see NCurses based YaST:

gcc-blog1 gcc-blog2

pure CLI way without YaST

Go to CLI (Konsole/Gnome-terminal/xterm or in to real CLI). You have to be use ‘root’ or have sudo rights to do any wizardry that is explained here. So I assume you just are root just type

zypper install gcc

and answer ‘y’ after it asks. It does the same as YaST.

That is that for first blog. If everything went right Now you have Gnu C-Compiler available. next time I’ll explain what you can do with it.

Disclaimer: All the stuff here are my own opinions not openSUSE nor Linux community. I'm have used openSUSE or SuSE something over 10 years. I have made professionally many years of development with openSUSE so I know somethings but I don't know everything and I just try to get you along.

 

Both comments and pings are currently closed.

Comments are closed.