I have completed defining subclasses and parent classes in MATLAB. The member variables of the subclass are complex structures with nested structures. The values of these member variables are obtained by calling external functions or other member functions within the class. I encapsulated the subclass into an entry function to convert it into a DLL. The input parameters of the function are passed to the constructor of the subclass, resulting in an instantiated object of the subclass. By referencing different member variables and their fields within the instantiated object, I can obtain the required values.
Now I need to use the Library Compiler to generate a DLL function for the encapsulated entry function so that I can continue development in Visual Studio 2019. Should I generate a "C shared library" or a "C++ shared library"? What type should I use to handle the return values of the DLL functions, mxArray or mwArray? How can I further process these types of return values in Visual Studio 2019 C/C++ to obtain the fields and values within the structures?