Has anyone stumbled upon this linker error ?
arm-none-eabi-c++ -nostdlib
-Xlinker --gc-sections -Xlinker
-print-memory-usage -Xlinker
--sort-section=alignment
-mcpu=cortex-m4
-mfpu=fpv4-sp-d16
-mfloat-abi=hard
-mthumb
-lpower_hardabi
other.c:68: undefined reference to `__enable_irq'
Calling it from a C++ file seem to link just fine.
Project is set to use NewlibNano.
Hello gbarcan@dialight.com
If you are using the wrong library variant, then you will see build errors of the form:
"Undefined reference to ‘xxx’"
For information about the library variants I suggest you to check chapter 17.2 Library variants of MCUXpresso IDE User Guide
https://www.nxp.com/docs/en/user-guide/MCUXpresso_IDE_User_Guide.pdf
Also I will suggest to check the following link with tips for mixing C and C++:
https://isocpp.org/wiki/faq/mixing-c-and-cpp
Let me know if this helps
Best regards
Omar
-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!
-------------------------------------------------------------------------------