Failed to compile RF3.4
-
@dc42 : you're right, it's there. Don't know how I could miss it
Any Idea what I could try to solve that undefined reference to `pow' and 'llrint' ?
Do I need to add a reference to libm.a somewhere?Thanks
Giuliano -
@giuliano I don't know why you are getting those errors and I am not, however I do know that sometimes the Gnu linker can fail to pick up a library function because it scanned the libraries in the wrong order. If that's the case then adding libm at the end of the library list might help.
-
@giuliano PS there is also a --verbose switch that you could add to the linker command, in case the output gives a hint about what is failing. See https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_node/ld_3.html.
-
-
I copied libm from the GNU Arm Embedded Toolchain to one of the projects build folder (C:\Eclipse\Firmware\RRFLibraries\SAME70_RTOS) and added libm to the library list again as you suggersted and it works this way.
Not sure why the build process wasn't reading it from the original folder, although in the log i saw the entry:
attempt to open c:/program files (x86)/gnu arm embedded toolchain/10 2021.10/bin/../lib/gcc/arm-none-eabi/10.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m+dp/hard\libm.a succeededYou can close this thread i think.
Thanks a lot for your help
-
@giuliano @dc42 I have encountered the same errors. I am very new to this entire process and I am confused by what you mean by adding libm to the "library list". What / where is this list you are adding it to? I have the libm file and I have moved it to the RRFLibraries folder, so it is just the library list I need guidance to.
-
@gingergradstudent I mean add it to the list of libraries in the linker settings, after supc++. It probably isn't necessary to copy it anywhere.
-
Further to my previous reply, this linker error only occurs when using Eclipse 2022-06, whereas I have been building with Eclipse 2022-03. A fix is to add "m" (not "libm" as I suggested previously) without quotes to the linker library list. I will add this to the project configuration.
-
@dc42 I installed Eclipse 2022-03 instead of Eclipse 2022-06 and that fixed everything. Thanks!
-
@gingergradstudent @dc42
Thank you very much, I also managed to compile it