Solution
lvanlys or most LabVIEW built-in library is designed to be called from LabVIEW. It assumes things like memory being passed as LabVIEW handles allocated with the LabVIEW memory manager. It would not be appropriate to be called from other languages.
NI do have LabWindows/CVI Real Time Module is for old Real-Time system, in other words, Pharlap environment. However, for Linux Real-Time system, it is not supported.
Measurement Studio is the NI solution for analysis APIs in C/C++. However, because Visual Studio where Measurement Studio works is for Windows application only, this cannot be used for Real-Time application development.
To conclude, you should use LabVIEW or use other third-party analysis functionality or library for development.