issue on file include path ( error - undefined reference )

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

issue on file include path ( error - undefined reference )

503 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by RatheeshT on Wed Jan 13 06:28:30 MST 2016
Hi,

If i include .h in inc folder and .c files in src folder within the project directory , my application is running without errors.

Instead if i split .h & .c files in separate folder it show error like " undefined reference " . In order to complete this i have included the path also.
" projects properties/ c-c++ build/ settings/ includes"

Please suggest me if i want to do something more.

I have attached the image file also for your reference.

Thanks in Advance


Regards,
Ratheesh T
Labels (1)
0 Kudos
3 Replies

487 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by R2D2 on Thu Jan 14 06:27:10 MST 2016
:quest:

Read the FAQ:

Creating and Linking to Library Projects

0 Kudos

487 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by RatheeshT on Thu Jan 14 05:30:49 MST 2016
Hi,

Thank you for immediate response.

OK I understand i.e LINKER ERROR.

Then How can i link my .c & .h files  ( which are not exist in default src & inc folders)  with libraries OR projects ?

Things i have done
        i just include the path of .h files in " projects properties/ c-c++ build/ settings/ includes".
        It gives me " undefined reference " as error.

Please tell me , what can i do to solve this?
0 Kudos

487 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by vtw.433e on Wed Jan 13 10:10:45 MST 2016
"Undefined reference" is a Linker error and not a compiler error. i.e. It is nothing to do with include paths.

It could be that you have misspelt the name or you may have to link with the library that satisfies the reference.
0 Kudos