-
-
Notifications
You must be signed in to change notification settings - Fork 7k
Use precompiled .a library #4336
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
Comments
And #199, which is the imported version of the google code issue, closed by @ffisore with:
I wouldn't consider that sufficient reason to not add this, though - in the end it's up to whoever distributes things to comply with licenses, and there are certainly situations where including precompiled files does not violate GPL. |
In this formulation, this is not a true statement. Anyone can privately use GPLed code, compile it with non-GPL code, and not have the roof of their office fall on their head (i.e. I do not have to hang my code out on my balcony to have the right to use it with GPLed code). What cannot be done distribute a derivative work of a GPLed piece of work which does not itself comply with the GPL terms. |
I am not sure I would call what the IDE does support. The files can be compiled, but syntax coloring is random. Considering how great Arduino is as a teaching platform, IMHO offering first class support for ASM makes a lot of sense. see #274 |
While for C, with its simple and quasi-standard ABI, this may not be a problem (GPL aside, that is), C++ name mangling and language evolution means that the ABI may change, even between different versions of the same compiler on the same platform. It actually just recently has in GCC 5 for C++11. Long story short, binary libraries are more complex than you think and you should avoid them in open source projects, especially when using C++. |
Okay that could make sense. However I am speaking of a C library here. It makes sense to include it because there is no other simple way to compile it with the ide itself. Also I think the c limitation (no c++) is not a problem, since we only want to use this for optimized code which is normally never c++. Thx for pointing this out though. |
Closed by arduino/arduino-builder#219 The Arduino IDE now supports .a and .so files in libraries. See instructions in the |
I got a undefined reference error while using a static library. |
@david-niklas support for precompiled libraries in samd has been merged only in beta branch with arduino/ArduinoCore-samd@37c8d4f . If you want to test in an easy way, install core |
Thanks a lot! I think I do not have the driver for the samd. Therefore I did execute \hardware\samd_beta\1.6.25\drivers/dpinst-amd64.exe Do you know how I can solve that problem? |
It means that the beta installation didn't succeed... Which IDE version are you using? Make sure |
I reinstalled the samd beta folder and know the error does't accrue anymore. But know i do have the "undefined reference" error again. |
Make sure you are selecting the right board from the menu (they will be doubled, so enabling verbose compilation and checking the paths is a must) |
I did that and got that as output |
Ok, now everything makes sense 🙂 The builder is adding the right folder Automatic detection only works if the library is called To work around this, add EDIT: I just noticed that your file is called |
Awesome!! Thanks a lot. If i do have multiple libraries: libaccess2.a libaccess2.a libaccess3.a libaccess4.a ldflags=-laccess1.a |
A single flag with |
Thanks for you help :) |
I try to add a precompiled .a library to my sketch. However it does not use the .a file laying inside a libraries folder.
This is an important feature, since you can compile optimized functions with a makefile and include those later. In my case I wanted to use this library:
http://munacl.cryptojedi.org/atmega.shtml
It could later also make sense to add a more complex USB-Core like LUFA.
.o files would also be nice.
I think we already have .S support, hex export and .a linkage, so why not also add precompiled .a files as feature? I guess I somehow need to add a platform.txt file or so, if anyone can help, please do so. Thanks!
Edit: 5 years earlier:
https://code.google.com/p/arduino/issues/detail?id=199 (#199)
The text was updated successfully, but these errors were encountered: