ObKo / stm32-cmake

CMake for stm32 developing.
MIT License
1.2k stars 340 forks source link

Linking fails with `-lstm_cube: no such file or directory` #330

Closed DNedic closed 1 year ago

DNedic commented 1 year ago

Describe the bug When building a project, the linking step fails with -lstm_cube: no such file or directory.

Steps to reproduce Use any example and link a static library to the executable, stm32-cmake adds -lstm_cube at the end, presumably to make sure everything link to the HAL, however stm_cube is not recognized as a library.

Environment:

DNedic commented 1 year ago

Apparently, the issue was caused by a leftover target_link_libraries() call in my library, which was valid in early versions of stm32-cmake.