I have spent the majority of today stuck on this problem, so any help would be greatly appreciated:
My project involves making use of a relatively elaborate MATLAB algorithm to analyze a large amount of raw data. This raw data will be formatted based upon user input, which will be handled by LabWindows.
As such, I wanted to start with the basics, so I made a practically empty MATLAB function and successfully compiled it via MATLAB Compiler SDK. The outputs of this process were a .h file, a .dll file and a .lib file, in addition to others which I do not believe are important.
I have tried both static linking the .h file as well as dynamically linking the .lib file to the pre-existing C code. When static linking, I received numerous errors, with the most persistent ones relating to linking errors of the functions that initialized and terminated the MATLAB runtime engine. Subsequent to these errors, I tried adding the .lib file to the project itself, but it would only appear as a grayed out object. I assume this means it is invalid or not understood by LabWindows.
After this, I tried dynamically linking the library file to the C code, but received the following error message after this attempt: " xxxx\CVI\initial_function.lib is either not designed to run on Windows or it contains an error. Try installing the program again using the original installation media or contact your system administrator or the software vendor for support."
Given the simplicity of the function, I am unsure what to try next. I do not know of another means of bringing a C shared library from MATLAB into LabWindows. If relevant, MATLAB Compiler SDK is outputting C compatible dll files, and not C++ compatible files.
Thanks in advance.