-
Notifications
You must be signed in to change notification settings - Fork 28
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
does not compile #17
Comments
Have taken a look at the vector example in the All examples get tested by our CI (Github Action) on every commit automatically and work fine: https://github.com/modm-io/avr-libstdcpp/runs/5250992849?check_suite_focus=true |
Hi, I have now specified all the flags according to the make file in Atmel Studio. It still does not compile with the same errors. About your objection. How else are you supposed to do it? That is the usual way. Make lib folder known, then include and apply. You tested this only with the g++? But you write it would also work with the avr-gcc. Which it doesn't. Did you also test it with avr-gcc? |
Then your build probably still misses the source files in
Which exact compiler version are you using? Which environment (operation system, ...) are you using? Where did you get your avr-gcc compiler? What additional compiler flags does you IDE(s) pass to the avr-gcc compiler? |
Looking at the error messages you posted in you first comment the problem seems easy: You are missing the |
Hi, can we speak in german? |
I would like to thank you very much for the question. And thanks for the replies. So I managed to put this std++ implementation into operation in Arduino. A few tests still need to be done. |
I just looked at this post and it's going in the right direction. Raphael (@rleh) is correct and on the right track for this issue. Indeed, one of the tricky things about If you look at the full template signature of Things you can try...
I have examples for most of this stuff if you'd like to dive deeper into any of these ideas... |
Hello, it was about how to get the avr-libstdcpp lib running in Atmel Studio on Windows. I was able to solve this with the help of another forum. If you are interested in this ... You have to specify the path to the include directory in the project properties under directories. Under Miscellaneous the usual: -std=c++20 -flto -Wno-volatile And in Solution Explorer you have to add the .cc and .cpp files. After that you can start with the avr-libstdcpp lib. If you want to show examples, feel free to do so. :-) |
Understood. Sorry, I had not understood that point. Yes. Simply add the include path on the compiler command line with the GUI (which boils down to the GCC command line Not every compiler allows the specification of a path for its STL. GCC, however, odes a fine job on this for AVR and also for other toolchain targets such as ARM. So if you ever get a cool embedable STL, you can use it not only with AVR in Microchip's ATMEL Studio, but also with other targets on other environments. I do have a related question: I notice you are mentioning the flag |
Hi @mikrocoder in another repository, I have some detailed benchmarks running on AVR. Some of them make rather heavy use of C++/STL. For each benchmark, You might enjoy the depth and scope of some of those benchmarks and their enclosing repo. In the root of theproject, there is a workspace for ATMEL Studio. |
Hi, I'll have a look at your examples. Let's see if I understand them. Anyway, thanks for that. AS always uses its outdated avr-gcc 5.4.0. There is nothing newer. I use my own toolchain with avr-gcc 11.2.0 with binutils 2.38. From the http://packs.download.atmel.com/ are added, see below ... the standard controllers are included anyway. In Atmel Studio you still have to add the packages in Device Manager. If you want can upload my toolchain to dropbox. Can be included in Atmel Studio and also in Arduino IDE. Zak Kemble https://blog.zakkemble.net/avr-gcc-builds/ also offers updated toolchains in larger intervals. Only his description for Arduino does not work.
Translated with www.DeepL.com/Translator (free version) |
That is a really good idea. I am glad to hear oyu did that. I'll get back to you if needed. We are straying just a bit off topic, but for more completeness, one more link... You might like my build of I solved some of the missing device file problems (but not all of them). I made a bunch of notes on building here. There are some other target GCC builds there that might interest you as well. |
Hello, there is a new problem. gcc 11.3.0 is out. In it there were changes in the math lib. Now sadly with avr-libstdcpp there is the problem of conflictings declarations and previous declarations. Could this be fixed at some point?
|
Do you have a build of
This topic is something i can look into. But it might take a bit of time to straighten out the |
Hi,
Yes.
Okay that would be very nice. It does not push. I have plenty of time. |
Cool. I actually mean, do you have one available that we could use for testing? I can spin one up in a few hours, but if you've got one, that's easier... |
Hi, I can provide. For Windows in .rar and .zip, each as he likes and for Linux. Whereby the Linux version is not tested. I use only the Windows version. I delete again in a few days. Link |
Awesome builds @mikrocoder. Many thanks. OK, so here is the deal... Lines like this are actually incorrect. This is because the proper C-language signature of such functions returns I have not figured out all the inconsistencies yet. And I'm not sure if compiler option or complete repair is best (as these signatures originate in So I have opened a new issue #18 to handle this. I'll try a few things there and report back when done. |
Can we now close this issue @mikrocoder (assuming we follow the latest point in #18) ? Cc: @salkinium and @rleh and @chris-durand |
I've given you triage rights @ckormanyos, so that you can manage issues directly. |
The first point is finished: When using this STL library with ATMEL Studio, two thngs are needed:
The second point ( |
Thank you Niklas (@salkinium). |
I think I forgot to thank you for your work. Better late than never. :-) |
Hi,
your lib looks very promising. Unfortunately there are big problems with it. If I use it with Arduino then the controller always resets.
If I use it in Atmel Studio 7 it always compiles with error messages. Your vector example does not compile either. It doesn't matter if I use an avr-gcc toolchain with gcc 9.3.0 or 11.2.0. Also in the Arduino IDE.
I can include vector without errors, but when I use it, it doesn't compile anymore.
Now I wanted to ask in which IDE do you program? In which environment did you test all this? According to your description it should work with avr-gcc.
2 Examples with Atmel Studio 7.
Output
Output
Translated with www.DeepL.com/Translator (free version)
The text was updated successfully, but these errors were encountered: