jtrot
Posts: 5
Joined: Thu Mar 15, 2018 1:11 pm

program will not compile

Thu Mar 15, 2018 2:01 pm

I don't have a lot of programming (using C) experience so forgive my probably stupid question.
I have downloaded the gert software and saved it to the Documents folder on my version 3B raspberry pi. I can run the atod example program after I did the make all. i wrote a program trying to use the A/D functions, but the program will not compile. I am compiling from the command line with:
gcc -o DTOA@ DTOA2.c
Even if I open the atod.c example file and save it as another name, it will not compile. i have saved the file in the same directory as the gertboard programs. I have:
#include "gb_spi.h"
#include "gb_common.h"
I and getting the error: fatal error:gb_common.h no such directory or file

i didn't know if i needed -l option like I do with -lwiringPi when i compile.

Any help would be greatly appreciated!

jtrot
Posts: 5
Joined: Thu Mar 15, 2018 1:11 pm

Re: program will not compile

Thu Mar 15, 2018 3:16 pm

I changed

jtrot
Posts: 5
Joined: Thu Mar 15, 2018 1:11 pm

Re: program will not compile

Thu Mar 15, 2018 3:19 pm

I changed the gb_spi.h to gb_spi.c after i looked at the gb_spi.h file and found the .c file. the program compiles now but when I try to run it with sudo ./DTOA it gives me a segmentation fault.

Return to “Gertboard classic”

Who is online

Users browsing this forum: No registered users and 1 guest