I am building an Azure Sphere C application, starting from the HTTPS_Curl_Easy sample project. I need json parsing, so I downloaded the Jansson library code. The project that Jansson generates when using Cmake wouldn't add as a reference to my Sphere project, because it targets Win32, so I created an empty Azure sphere library project, copied all the jansson code into it and messed with the defined variables until the project compiled.
Now I am trying to add that Jansson library to my HTTPS_Curl_Easy sample, however I cannot get it to be available in the project (It says jansson.h is not available):
Two specific questions:
In an azure Sphere library project, how do I tell it what to export? The project template had an Inc\Public folder - does the header file have to be in there? (mine isn't because the source wouldn't build with it in there)
How should I add a reference to a library project in an Azure Sphere project? I right-clicked the project and clicked add->reference to add my jansson_sphere library project, but although it is in the project file it doesn't show in any dependency list that I could find.
Source for my project and my attempt to build Jansson is in github here: https://github.com/Joon/HTTPS_Curl_Easy