Code::Blocks Forums
User forums => Using Code::Blocks => Topic started by: petec on March 21, 2019, 06:27:50 pm
-
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?)
-
http://wiki.codeblocks.org/index.php/FAQ-Compiling_(general)#Q:_How_do_I_report_a_compilation_problem_on_the_forums.3F
we need exact error messages and logs... with "undefined reference to...." we can not help...
-
Have you performed these two steps?
Go to Project → Build Options if not.
-
hidefromkgb,
Thank you.
That worked
I'm debugging rigth now.
It has been a long time....a very long time since I have been helped so expertly on any forum anywhere.
Thanks Again,
Pete