Error building ThermostatIO back-end SBIO sample code for using Visual Studio
an issue came up when trying to build the C source code and back-end test application for the ThermostatIO sample that is included with Storyboard Designer.
The idea is to run this on the desktop to drive the UI events using the Storyboard IO (SBIO) API.
The problem is that you can't compile the backend example in windows using MS Visual Studio. If you follow the instructions in the readme file it compiles but fails to link and get this error:
Error LNK2019 unresolved external symbol __imp__sprintf referenced in function _gre_io_open ThermostatIO C:\Users\jmnavarrete\storyboard_workspace\ThermostatIO\source_code\libgreio.lib(greio_msmailslot.obj)
The error indicates it seems that the linker can't find a library dependency in the libgreio.lib.
The runtime library being used for this is:
Hi Daniel, Thanks for your forum post. I have an idea what this is however we would need some more information from you such as Storyboard release version, build error logs etc. Please can you create a support ticket by emailing our support team at firstname.lastname@example.org and we can follow-up through that route. Regards, Garry
After some investigation it looks like this is caused by some changes within Visual Studio tools in relation to inlined functions. This is likely to be caused by the use the sprintf library functions within the library for serialisation and other variable handling, logging and tracing.
The inspiration came from a look at the external forum post below:
Adding the legacy library to the linker command line resolves the dependency:
A quick test shows the issue is fixed and the code builds and runs just fine on Windows desktop.
Hey Garry, we have the same problem at the moment. We added the legacy library but it still doesnt work. VS 2020. Do you have an idea ? Thanks!
Please sign in to leave a comment.