Error building ThermostatIO back-end SBIO sample code for using Visual Studio

All,

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:

C:\Program Files\Crank_Software\Storyboard_Engine\5.3.201807051156\win32-x86-opengles_2.0-obj

Regards,

Garry

0

Comments

1 comment
  • 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:
    https://stackoverflow.com/questions/32418766/c-unresolved-external-symbol-sprintf-and-sscanf-in-visual-studio-2015

    Adding the legacy library to the linker command line resolves the dependency:

    legacy_stdio_definitions.lib

    A quick test shows the issue is fixed and the code builds and runs just fine on Windows desktop.

    Regards,

    Garry

Please sign in to leave a comment.

Didn't find what you were looking for?

New post