Hi guys. I am new to arm and keil and I'm working on LPC1768 and keil5. I've wrote a header and source file and want to add it to my project. This is my steps:
- Source group -> add existing -> add MyHeader.c file
- target -> options -> C/C++ -> include paths -> add my include path
- write #include "MyHeader.h" at the top of main.c file
but still when I build the file i get error "Undefined symbol Function (referred from MyHeader.o)"
so pls help me with this. thank you
TypicalEngineer said:I am new to arm and keil
Do you have any experience with any other microcontroller(s) and/or any other IDE(s) ?
Or with 'C' programming in general ?
For Keil, start here:
http://www2.keil.com/mdk5/learn
See also: http://www.keil.com/books/
TypicalEngineer said:when I build the file i get error "Undefined symbol Function (referred from MyHeader.o)"
when I build the file i get error "Undefined symbol Function (referred from MyHeader.o)"
That's a Linker error.
MyHeader.o is the object file produced by compiling MyHeader.c
So it's telling you that some code in MyHeader.c has made referred to some symbol "Function" - but that symbol has not been defined anywhere in your project.
Without seeing your code, it's impossible to tell where you've gone wrong.
Why have you posted this in 'Infrastructure Solutions' ?
Hopefully a Moderator can move it to the Keil forum - where it belongs.
Andy Neil said:Do you have any experience with any other microcontroller(s) and/or any other IDE(s)
yes I have worked with atmel studio and AVR MCUs for a time.
You are right. I have forgotten to add another library which is used in my source code.
sorry. I'm confused with working in this forum
So you would get very much the same message from Atmel Studio!
eg, https://www.avrfreaks.net/forum/undefined-reference-error-0
TypicalEngineer said:I'm confused with working in this forum
Go on - the forum name and its description are clear on the page where you start a question:
and there's a list of other available forums:
Andy Neil said:and there's a list of other available forums
thank you for helping me with this