I was trying to add options to USE_LDOPT in the Makefile. I first had -lm alone and that appeared to work correctly. But when I added -lstdc++, then it didn't seem to add the linking for stdc++. Then I reversed it and only put -lstdc++. It seemed to link for stdc++ at that point correctly. But adding -lm after it caused the math additions to not occur.
The error I get if I put in -lstdc++ -lm for USE_LDOPT is:
/home/jcbless/Projects/ChibiStudio/tools/GNU Tools ARM Embedded/11.3.1 2022q3/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/bin/ld: cannot find -lm,--defsym=__process_stack_size__=0x400,--defsym=__main_stack_size__=0x400: No such file or directory
So in any case it appears that it is not taking in multiple options. Am I correct about this. What can be done to correct this if I'm interpreting the issue correctly?
Thanks,
John
USE_LDOPT with multiple items
- Giovanni
- Site Admin
- Posts: 14773
- Joined: Wed May 27, 2009 8:48 am
- Location: Salerno, Italy
- Has thanked: 1170 times
- Been thanked: 974 times
Re: USE_LDOPT with multiple items
That did it - thanks. Now I'm fighting other errors.
I'm getting:
undefined reference to `__dso_handle'
and
undefined reference to `_fini'
and
hidden symbol `__dso_handle' isn't defined
and
final link failed: bad value
I've added -fno-use-cxa-atexit to USE_CPPOPT and ,lc to USE_LDOPT
Any ideas about these errors?
Thanks,
John
I'm getting:
undefined reference to `__dso_handle'
and
undefined reference to `_fini'
and
hidden symbol `__dso_handle' isn't defined
and
final link failed: bad value
I've added -fno-use-cxa-atexit to USE_CPPOPT and ,lc to USE_LDOPT
Any ideas about these errors?
Thanks,
John
- Giovanni
- Site Admin
- Posts: 14773
- Joined: Wed May 27, 2009 8:48 am
- Location: Salerno, Italy
- Has thanked: 1170 times
- Been thanked: 974 times
Re: USE_LDOPT with multiple items
Probably it is something missing in linker files, those are not really done to support full C++, you may try to compare with linker files provided with the compiler.
Giovanni
Giovanni
Re: USE_LDOPT with multiple items
I corrected the ,lc to ,-lc since that was one simple mistake.
I also finally realized I had added this to a file while experimenting to solve another problem:
#include <iostream>
That was apparently causing the problems that I was seeing in the previous post. With this text removed I was able to eliminate the errors.
I also finally realized I had added this to a file while experimenting to solve another problem:
#include <iostream>
That was apparently causing the problems that I was seeing in the previous post. With this text removed I was able to eliminate the errors.
Who is online
Users browsing this forum: No registered users and 25 guests
