what i’m striving for is my project to use those files on one hand.
but be able to make changes to them that coudld tracked by git on the other
the libraries such as it is cannot be used in arduino, and requires some changes
for example:
it uses _Bool data type so i need to somehow include stdbool.h
some of it’s method signatures use int, which for arduino needs to be made into long int otherwise
some calculations will go wrong due to casting
one of it’s classes uses a crap load of strings (to hold date and festival descriptions) those would need to be refactord to use PSTR, otherwise it won’t fit into arduino memory, and yet i still need to retain the ability for the original library to function as before.
i’d like to do all those changes inside the original library so those could be tracked into a PR
my platfrom.ini has src_filter because i have several main methods i want to experiment with
so i thought about a possiblity that those files could copied automatically by platfrom.io everytime i do a build in the event of a special build flag. because trying to use them where they are creates several issues (for example not being able to find several other files they depend on, because that project relies on maketools)
so i need to create a minimal library.json, i’ve been trying to do that, but i keep getting Error: Could not find one of ‘library.json, library.properties, module.json’ manifest files in the package
whne i do symlink://C:/Users/User/Documents/PlatformIO/Projects/JewishClock/libzmanim
under lib_deps
never mind i clearned my build dir thanks
now it seems i have an additional problem that library has an additional folder to be included (on top of the standard src include folders, how to i keep those and add this folder as well?
(it seems to be inlcuded only in the event of _WIN32 which i can’t undo as it’s from the compiler)
The includeDir and srcDir are base directories. You can change them. Also, it is possible to add more relative include paths to the includeDir using flags field.
well yes, and no… yes, it most certeintly helped understand it better,
cause if i got this correcty srcFilter effects only the srcDir and flags -I will effect only the includeDir
so i would need to first include everyhing using includrDir :“.” but "cancel that wild card inclusion by using -I include to selectivly include only specific folder
i would also need to use srcDir “.” but then do the complete opppsite of -I and remove all the folders i don’t want in the srcFilter
btw it seems more consistent to do:
C:\Users\User\AppData\Local\Temp\cc3mAJSl.ltrans0.ltrans.o: In function addchar.constprop.53': <artificial>:(.text+0x27e6): undefined reference to stpncpy’
which means if i understand correctly, that it can find stpncpy.h, but i can’t find stpncpy.c which is weird because they are in the same folder
one other thing the stpncpy.c does not contain a reference to the header files
so i’m wondering if somehow and because they are both located in the folder this is an issue.
thing is, if i change the build element to this, i get linkage errors where my own class can’t find any of the methods, so i can’t be sure of anything
turns out the only way i’ve gotten this to work at all is rename some of the files from c to cpp
basically i have this logical depdencny
ClockController.cpp - my own arduino class
*hebrewcalender.c
*hebdateformat.c
*hebrewcalender.c
*stpncpy.c
btw while we’re talking about hebdateformat.c
this is the most problematic class, because such as it is it consumes a lot of memory with string constants, that i would to wrap with PSTR , it also have a rather large array of strings that may need to have the same treatment.
but the same time it has many functions that can be reused
so i’m not sure exactly how it can be handled
can PROJECT_DIR be used with SIMLINK?
i tried using symlink://${PROJECT_DIR}/…/ext_libs/libzmanim but it says
Error: Can not create a symbolic link for ${PROJECT_DIR}/../ext_libs/libzmanim, not a directory
but specifcying
symlink://C:\Users\User\Documents\PlatformIO\Projects\JewishClock\ext_libs\libzmanim
does work
also the final answer it would appear to all my issues undefined reference with includes is that for the library.json i had to specify -std=c11 in th flags section