Closed Uzaaft closed 1 year ago
I'm not sure what you mean.
indicators.c and candles.c are compiled into object files, along with all of the actual indicator code files (e.g. indicators/bbands.c) and added to the library. The header files aren't compiled by themselves or added to the library in any separate way. How else could it even work?
So I compiled the repository as is with make libindicators.a
and when I run ar -t libindicators.a
, I get out a list, with the few first entries being:
indicators.h
candles.h
indicators.c
candles.c
abs.o
...
Now, from my understand(very limited compared to yours), static libraries should generally only contain object files. When I tried to run my wrapper with the default implementation, I got:
= note: ld: archive member 'indicators.h' not a mach-o file in '/Users/uzaaft/projects/tulip-rs/tulipindicators/libi
Which for me seemed weird, so I had to look, tried to remove all .c and .h files from the command, and compiled again, and it worked, and the tests passed.
I hope this gives you a fuller image of what issue I met. Sorry if it seems lacking in regards of details, I typed this on my phone
You're right. Thanks for bringing this to my attention. I will fix it.
It should be fixed now.
Side effect: I can now compile the whole project! Appreciate the quick help!
I've got a question: Why is the
indicators.h candles.h indicators.c candles.c
files added to the final library when runningmake libindicators.a
? I bumped into this while creating rust bindings, and the fact that the source code + header files were included seemed to cause issues at my end.