[CMake] undefined reference to `_exit'
hex
hex7c3 at gmail.com
Mon Feb 4 10:35:43 EST 2019
dear community,
This question has originally been placed in another community [1].
I did read the mailing list netiquette before posting here but I was not
aware this behaviour is discouraged.
Therefore, I want to apologize. Good etiquette is important, I am
grateful for any advice on how I can make the Internet a better place.
The solution to the undefined reference errors is to set the
-specs=nosys.specs flag as mentioned here [2]
in combination with not using the -nostartfiles flag which made the
_exit referenced in nosys.specs not being used.
Since this is also making this question a duplicate of [2] I decided to
delete it in stackoverflow.
Thank you for your help.
[1]
https://stackoverflow.com/questions/54487747/cmake-undefined-reference-to-exit-while-including-startup-code-as-a-library
[2]
https://stackoverflow.com/questions/19419782/exit-c-text0x18-undefined-reference-to-exit-when-using-arm-none-eabi-gcc
More information about the CMake
mailing list