That seems quite a lot of work to do that. Linking dynamically Fricas and my program through an API in LIPS that pipe the commands seems way less work but that means that my program won't be standalone anymore. I only need some symbolic manipulations on rational fractions and some transform so I might end up using another software if I can find one
Thanks for this really extensive and clear response! On Thursday, March 22, 2018 at 1:30:29 PM UTC+1, Waldek Hebisch wrote: > > F Jean wrote: > > > > Hello, I saw that there is an api to use Fricas. I was wondering if I > could > > compile Fricas as a static library and if so where the headers are? > > I couldn't find much information on that > > FriCAS is compiled via Lisp and can be used as a Lisp library. > If you want to use FriCAS from C or a language capable of calling > C you need to compile FriCAS using ECL. ECL provides a collection > of interface functions to call Lisp and in that (rather complicated) > way you can call arbitrary FriCAS functions. Now troubles: > > - using ECL you get collection of _shared_ libraries. It would > requre extra effort to produce static library. It is likely > that if you managed to produce static library such library > would effectively pull whole FriCAS into your executable, > so you would get rather large binary, bigger than FriCAS > binary (FriCAS limits memory use by dynamically loading > needed parts). > - concerning header files there are none. Creating needed > files for a handful of functions is easy by hand, but > FriCAS exports several thousands of functions and doing > appropriate interface by hand would be huge job. As > extra complication, FriCAS is strongly typed with quite > flexible and powerful type system. Expressing FriCAS > types in other languages is tricky (C++ templates probably > are powerfull enough, but still translation is nontrivial). > > To put this differently: if you need some selected FriCAS > functions, then this can be done in mostly manual way with > reasonable effort. If you want "full API", then you > need serious work or some new idea. > > -- > Waldek Hebisch > -- You received this message because you are subscribed to the Google Groups "FriCAS - computer algebra system" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/fricas-devel. For more options, visit https://groups.google.com/d/optout.
