g++ can't find lstdc++_s
I'd like to compile a hello world program in c++ before I start compiling real code, just so I know
I can use the toolchain correctly (I've been using it on C code for some time now).
When I run
arm-none-eabi-g++ hello.cpp -mthumb -mcpu=cortex-m0 -Os -ffunction-sections -fdata-sections -fno-exceptions --specs=nano.specs -Wl,--gc-sections -Wl,-Map=cpp.map -o cpp-CM0.axf -lc -lstdc++ -lc -lnosys
I get the following g++ output:
/home/nrhinnant
/home/nrhinnant
/home/nrhinnant
/home/nrhinnant
/home/nrhinnant
collect2: error: ld returned 1 exit status
Do I need to pass a specific path to lstdc++_s? Is it a prebuilt library or do I need to enable it's creation when I build the toolchain? I'm cross-compiling onto the STM32F407VG.
Thank you very much for your time!
Question information
- Language:
- English Edit question
- Status:
- Answered
- Assignee:
- No assignee Edit question
- Last query:
- Last reply:
Can you help with this problem?
Provide an answer of your own, or ask nrh for more information if necessary.