This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Add Header and Source file in keil5

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

Parents
  • 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/

    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.

Reply
  • 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/

    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.

Children
No data