SparkFun Forums 

Where electronics enthusiasts find answers.

Have questions about a SparkFun product or board? This is the place to be.
By Osprey
#192903
I got a Pi-Top for Christmas, using a raspberry pi 3 model B. I am doing some experiments on it, after installing a Proto board, connecting to the GPIO pins. The instructions for the experiment kit I have are for a bare Raspberry Pi, running an OS version that is different from the hybrid Pi-Top OS. In order to use some of their included C code, I need the gcc compiler, and apparently this is not installed by default on the latest Pi-Top OS release I downloaded and am using. I get an error when I try to run the gcc command to compile a provided code.

Linux is pretty new to me. I know I can probably get what I need from some online repository, but I don't know the proper commands to get it. Could someone please point me to the information I need to get gcc working on the pi-top?
By Osprey
#192913
lyndon wrote:What command are you issuing to run the compiler?
Here are the instructions to run the project in C after it has been wired up:

For C language users:
Step 2: Change directory
cd /home/pi/Sunfounder_SuperKit_C_code_for_RaspberryPi/01_LED/

Step 3: Compile
gcc led.c –o led –lwiringPi
Step 4: Run
sudo ./led

when I enter the commands for step 3 I get an error that gcc is not a recognized command.
By Osprey
#192916
Thank you for the help. :)

As it turns out, the Pi-Top OS does indeed include the gcc compiler, and I got the project running once I realized I had been misreading one of the commands.

The command had a lower case "l" that I mistook to be a "1" in the command "lwiringPi", especially because they used a dark gray fill behind all the code lines, which makes them difficult to read, even in good light. Moving past that error, I was able to execute the compile step with the gcc command, and run the project code.

Thanks again for your assistance!