[En-Nut-Discussion] Realy strange linker problem with NutOS 4.4.0 for Ethernut 3.0 (ARM)

Ole Reinhardt ole.reinhardt at embedded-it.de
Tue Feb 12 15:45:59 CET 2008


Hi,

> > Everything works fine until I use the strdup() function in my sources.
> 
> strdup() is not supplied by Nut/OS. Thus, it will collect the missing 
> routine from the newlib, which is part of your ARM toolchain. However, 
> more dependencies are created and finally you end up with lots of linker 
> errors and duplicates.

Ok. I did not dig into what is linked and what not. Strdup is supplied
in nut/c/string/strdup.c. After looking a bit deeper, it seems only to
be compiled for platforms not providing these libs.

Strange is, that all other funcions provided in nut/c/string/ are not
linked either and seem to be provided by newlib. Using them does not
trigger this problem.

> Specific solution: Add an strdup() implementation to your application code.

That's what I've done.

Thanks,

Ole


-- 
 _____________________________________________________________
|                                                             |
| Embedded-IT          Hard- und Softwarelösungen             |
|                                                             |
| Ole Reinhardt        Tel. / Fax:        +49 (0)271  7420433 |
| Luisenstraße 29      Mobil:             +49 (0)177  7420433 |
| 57076 Siegen         eMail:    ole.reinhardt at embedded-it.de |
| Germany              Web:         http://www.embedded-it.de |
|                      UstID / VAT:       DE198944716         |
|_____________________________________________________________|




More information about the En-Nut-Discussion mailing list