Reputation: 539
I am using IAR Workbench to compile my codes,
Even I added all Stm32 Hal library in folder and objects>processor in my project
I get this errors:
[ErrorLi005]: no definition for "HAL_SPI_Init" [referenced from C:\Users\Desktop\Project\EWARM\Project\Obj\api_lib.o
[ErrorLi005]: no definition for "HAL_I2C_Init" [referenced from C:\Users\Desktop\Project\EWARM\Project\Obj\api_lib.o
[ErrorLi005]: no definition for "HAL_USART_Init" [referenced from C:\Users\Desktop\Project\EWARM\Project\Obj\api_lib.o
[ErrorLi005]: no definition for "HAL_ETH_Init" [referenced from C:\Users\Desktop\Project\EWARM\Project\Obj\api_lib.o
...
Linking error
How can I solve this error ?
Upvotes: 3
Views: 1099
Reputation: 16043
You haven't told linker to use the library file, so it cannot find matching symbols which you are using in your object files.
Assuming your library is already compiled (.a
or .lib
file), go to Project > Options... > Category: Linker > Library and add your library file to Additional libraries box.
Upvotes: 1