Issue
I want to do basic statistics with Vlang.
Can I use C libraries? For example, Apophenia: http://apophenia.info/
Or IMSL C stat library: https://docs.roguewave.com/en/imsl/c/8.6/pdf/C_Stat_library.pdf
Thanks for your help.
Solution
Yes, you can call C libraries from V.
You need to make the C library's structs, typedefs and functions known to V by defining them in V first - before calling/using them.
For structs you conveniently only need to define the fields you need to use.
Here's some examples:
- via 2D game framework wrapping several C libs
- sokol in vlib
- v-miniaudio wrapper (disclaimer: my own module)
Generally you can find a lot of C wrapper code in vlib itself. (We're working on replacing C with pure V)
Answered By - Larpon Answer Checked By - Timothy Miller (PHPFixing Admin)
0 Comments:
Post a Comment
Note: Only a member of this blog may post a comment.