I am new to:
Raspberry Pi,
Linux,
C code.
But I have done some Java, Visual Basic. and a whole lot of assembly code.
I have a C file that was given to me...call it MyProgram.c.
It contains the includes:
#include <SoapySDR/Device.h>
#include <SoapySDR/Formats.h>
#include <stdio.h> //printf
#include <stdlib.h> //free
#include <complex.h>
#include <liquid/liquid.h>
The person that gave it to me said (on Raspberry Pi using Raspbian and gcc) to use the command line:
gcc -O2 -std=c99 -o MyProgram MyProgram.c -lSoapySDR -lliquid
It executes perfectly and I get the executable MyProgram and it runs fine.
I need to add a lot of code to the file and would like to use the CodeBlocks debug facility so I want to start with MyProgram.c and expand it. In CodeBlocks I created a project as an empty C project and added a new C source where I pasted the lines from MyProgram.c
When I try to Build I get "undefined reference to...." every reference to names in either of the SoapSDR includes and the liquid include.
I have tried to get CodeBlocks to use that command line by placing it in:
(1) Settings Global Compiler Settings Other compiler options.
(2) A similar location in the Build options
(3) Project/targets options
(4) other places that might help.
(can you tell I don't know what I am doing?)