General Setup:
A simple cpp application which uses HIDAPI library to communicate with NanoEVM . This HIDAPI is compiled as a DLL in Visual Studio using msvc compiler.
Try 1:
I've used MinGW/MSYS2 Environment to compile DLP Spectrum Library to a DLL File. This DLL was linked (Using it as an additional dependency in MSVS Project) to the executable. The test programs compilation succeeds. However, when executed, the function call dlpspec_scan_read_configuration() sometimes just simply does not execute, sometimes doesnot return back, sometimes works as expected and returns back with valid data.
For this try spectrum library was built using commands from build-dll.bat. Manually generated a .lib file for the corresponding .dll file using Visual Studio Developer Tools
Try 2:
This time used MinGW/MSYS again to compile libdlpspec as a static library (.a file). The compilation in Visual Studio fails because of unresolved external symbol __errno and __getreent originating from functions of the TPL Binary serialization library.
After some further research found that these symbols were part of Cygwin suite.
Try 3:
Freshly installed Cygwin with bintools, gcc and compiled the DLP Spectrum Library to a static library. This time also got similar unresolved external symbols as in Try 2 so I also linked libcygwin.a (from Cygwin installation) to the project and now the build succeeded. However, the behavior of dlpspec_scan_read_configuration() is the same as in Try 1.
Could anyone please throw some light at the missing detail. Is there any way to get this setup running properly using Visual Studio - Win32 Console Application working ?
My next try: (Which I am still quite hesitant ATM) To build the test application along with HDIAPI and libdlpspec completely in Cygwin