Linker errors on system calls

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

Linker errors on system calls

233 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by mawg on Mon Dec 05 23:41:45 MST 2011
I had a nice litle s/w only project which I built using Cygwin in Netbeans under Windows 7.

Then I learened that I would be using an LPC 1700 board for development, so I D/Led the Espesso clipse IDE and dropped my existing code inte it.

The only errors I am getting are to do with system calls, such as  ...
f:/dropbox/programs/lpcxpresso/lpcxpresso/tools/bin/../lib/gcc/arm-none-eabi/4.5.1/../../../../arm-none-eabi/lib/thumb2\libc.a(lib_a-exit.o): In function `exit':
exit.c:(.text+0x1c): undefined reference to `_exit'
f:/dropbox/programs/lpcxpresso/lpcxpresso/tools/bin/../lib/gcc/arm-none-eabi/4.5.1/../../../../arm-none-eabi/lib/thumb2\libc.a(lib_a-fstatr.o): In function `_fstat_r':


While I would epxect it to work right out of the box, I suspect that I need a #define somewhere.

Any idea? I asure that this is a stoopid n00b error, but I can't find an answer by googling.


Thanks in advance for any help.
0 Kudos
2 Replies

202 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by mawg on Tue Dec 06 02:10:58 MST 2011
Thanks. Your link looks very useful.

Exit() is only called on the host (#if TESTING==UNIT_TEST), it just happened to be the first error message. I presume that I am calling all of the others somehow and just need to configure things correctly (one fix should cure all). I am sure that your link will shed light on it. Thanks!
0 Kudos

202 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by TheFallGuy on Tue Dec 06 01:49:00 MST 2011
Did you see the FAQ:
http://support.code-red-tech.com/CodeRedWiki/UndefinedReference

BTW: when running on an embedded system, it is really not a good idea to call exit - what do you think it is going to do?
0 Kudos