Skip to main content
JCorn.2
Associate III
September 24, 2019
Question

Linker Error: "no definition for __write".....

  • September 24, 2019
  • 2 replies
  • 3810 views

Hey everyone,

I am using IAR and a STM32F401RE.

When I am setting the library low-level interface implementation to "None", I get the following linker error:

Error[Li005]: no definition for "__write" [referenced from fflush.o(dl7M_tlf.a)]

Error[Li005]: no definition for "__lseek" [referenced from xfspos.o(dl7M_tlf.a)]

Error[Li005]: no definition for "__close" [referenced from fclose.o(dl7M_tlf.a)]

Error[Li005]: no definition for "remove" [referenced from fclose.o(dl7M_tlf.a)]

Does someone has an idea how to fix it or can guide me to the solution?

Many thanks!

This topic has been closed for replies.

2 replies

Moazam Ali
Visitor II
October 3, 2019

Just add C source file write, Iseek, close and remove from the Standard C or C++ Library into your project. You can find the source code for the Standard C or C++ library in the C:\Program Files (x86)\IAR Systems\Embedded Workbench 8.0\arm\src\lib\file directory of the IDE installation:

For more info see IAR's article on this:

https://www.iar.com/Support/resources/articles/overriding-and-redirecting-library-modules/

JCorn.2
JCorn.2Author
Associate III
October 7, 2019

Thank you @Moazam Ali​ , I will try that :)