My actions are: In the root at the same level as mos.exe, a folder for the library mylib created with *.c and *.h inside. In my app’s mos.yml, a reference added to the new library:
libs:
- name: mylib
I also add new sources with
sources:
- src
- ./mylib
The result I see is: An error with no such file or directory. The screen capture is shown below.
My expectation & question is: The user guide states that we should create a new library in the app under /deps but it will lose sharing ability that only the particular app can use the new library. Now I need to create a library that can be shared among apps. How to do it?
cloud build: create your library in the current application’s deps directory. Test it, upload it to github. After that you will be able to include it in any application
- origin: https://github.com/<account>/<lib_name>
local build: create your library in a directory of your choice. Include it in any application
To avoid stupid mistakes, I restarted everything with template clone from github with command: mos clone https://github.com/mongoose-os-apps/empty app1
In mos.yml of app1 in the root, I just added origin: ../mylib. Now, the app’s mos.yml is like:
If remote build is allowed, does it restrict to using https://github.com/mongoose-os-libs/...?
I have tried to create a repo with my github account like https://github.com/my_repo/mongoose-os-libs, in mos.yml I changed it to:
Private repo works for free account now. I tried a private repo but it didn’t compile. The same code compiled OK after switching private to public repo.
I am afraid installing one more component (docker) will create more issues.