hi all,
sorry if already told ,is it there a way to export a complete project ( I mean with shared libraries ) as zip file?
You mean like right click and zip the entire project folder from your file manager.
PS: just saw the note about shared libraries. You do realise that the entire way of handling projects in platformio forces anyone else to use platformio to develop or compile the code even if you give the sources to them. Then platformio.ini file contains the list of libraries it needs to build the project successfully. You are covered on that front.
yesβ¦ I mean like right click () but with shared libraries, what this kind of handling projects forces doesnβt matter to me.
about platformio.iniβ¦Iβm sorry to say that I donβt find any information about shared libraries thereβ¦ only when I build the project in the log screen there are which libraries are needed ,with full pathβ¦
When you install libraries you have several ways of handling it. Once is to use the library manager to install libraries per project or globally. The other way is to specify the libraries in the platformio.ini file. This way the entire project information is stored in the initial file. You can zip it and share it. hope this helps.
Yes this could be a way,(I missed this kind of option installing libraries thank you for the info) but itβs not what Iβm looking forβ¦
Just navigate to .pioenvs
directory in a project and copy *.a
files, they are static compilied libraries.
Ivan ,would you to marry me?
Thanks a lot.
What about headers? How should be project recompiled later?
Just make a private library which contains all headers and lib.a (archive).
Iβve been following this old thread about sharing libraries between projects and I canβt find any directory named .pioenvs in any of my project directories, even those projects that have built successfully. Where should this directory be located in the project structure?
Regarding *.a files, are they supposed to be in the .pioenvs directory? I do see some of these files located under the Build directory.
Rob
This thread is 7 yeras old. Many things have changed during the time.
If you crate a library and compile your project you will get an .a file in the build directory:
βMyLib
β (located in /lib/MyLib
) will end up as βMyLib.a
β in the directory .pio/build/envname/libXXX
:
Environment βesp32devβ:
.
βββ .pio
β βββ build
β βββ esp32dev
β βββ libcf0
β βββ MyLib
β β βββ MyLib.cpp.d
β β βββ MyLib.cpp.o
β βββ libMyLib.a
βββ include
βββ lib
β βββ MyLib
β β βββ src
β β β βββ MyLib.cpp
β β β βββ MyLib.h
β β βββ library.json
βββ src
β βββ main.cpp
βββ test
βββ platformio.ini