implicit declaration of function/undefined reference to

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

implicit declaration of function/undefined reference to

1,494 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by woodchuck on Thu Nov 29 13:15:13 MST 2012
I set up a new workspace and C project for  new target chip - the LPC1114FN28-102.

Unfortunately the compiler couldn't find the header files, so I copied all the header files from another project into the /src directory of this project.  That solved that problem but created new problems.  Now when I build, I get "implicit declaration of function" warnings, followed later by "undefined reference to" warnings, followed by a hard error the moment "make" begins.

This was clearly the wrong way to go about business, but what's the right way?  If it's documented anywhere, I couldn't find it.  And  a previous inquiry on this forum produced no response.  Where does one go from here?
0 Kudos
Reply
4 Replies

1,444 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Ex-Zero on Thu Nov 29 20:05:42 MST 2012
BTW including a library can be done very smart with 'Smart Update' function of LPCXpresso, mentioned in #3 http://knowledgebase.nxp.com/showthread.php?t=3860 ;)
0 Kudos
Reply

1,444 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by woodchuck on Thu Nov 29 19:38:20 MST 2012
BTW, the paths you mention in the thread you linked were already present.  But there were additional paths that had to be added.  Specifically, to the include path list, I added:

[B]"${workspace_loc:/LPC11xx_cmsis2_Lib/inc}"[/B]

To the first linker library box (-l) I added:

[B]LPC11xx_cmsis2_Lib[/B]

To the second linker library box (-L) I added:

[B]"${workspace_loc:LPC11xx_cmsis2_Lib/Debug}"[/B]

Now everything works swimmingly.  :)
0 Kudos
Reply

1,444 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by woodchuck on Thu Nov 29 16:32:46 MST 2012
That is a most interesting thread.  Thank you very much for referencing it!!

Making the necessary changes was easy.  Knowing what changes to make, and where to make them...that was a whole different matter!  A crystal ball should be on the list of system requirements for any would-be ARM developer. :)
0 Kudos
Reply

1,444 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Ex-Zero on Thu Nov 29 15:02:52 MST 2012
Did you set Include and Library paths like explained in #4 of http://knowledgebase.nxp.com/showthread.php?t=2558?
0 Kudos
Reply