Some definitions (e.g. DEFINE_ENUM(IOTHUB_CLIENT_RESULT, IOTHUB_CLIENT_RESULT_VALUES);) are not wrapped in extern "C" leading to linker errors when included in C++ code. Workaround is to wrap all includes in a top-level extern "C" block.
Release: 2018-03-02.
Uhm, yes. Thanks for letting us know about this. We need to fix the header in SDK itself of course.
Could you help me understand your scenario here for this & #411? Are you building IoT SDK as Windows DLL (or your code is a DLL and statically linking to Azure IoT SDK) and your app is C++?
I'm building the SDK as static libs, as that's the default and there are fewer files to deploy. This particular app is a C++ Windows service that is also a COM component/server. (It links dynamically to the CRT). Other components in my SW package use the C# SDK which has been less.. bumpy :)
Re #411: I took the time to understand the enum macros and realized that these also define conversions to/from textual strings. When logging errors, I'd much more prefer to output a readable enum name than an int constant. So I hit #411.
More background: I'm building software for a product that is headless embedded device. I need to have strict control of all code that's going to run on the device and how it's built. [1] Therefore I build all native dependencies myself, install them under own directory (e.g. C:\deps) and put that directory into subversion. That way I get reproducible builds and can easily track what SW version each device is running (I'm also embedding VERSIONINFO including SVN revision in my executables/DLLs).
[1] I have also forsaken the "Debug" mode as it's ABI-incompatible with Release. I build all dependencies as Release, whereas the "Debug" configuration of my projects (I named it "RelNoOpt") is actually Release with all optimizations turned off so the debugging experience is still comfortable.
That's also the reason I'm not using vcpkg or NuGet prebuilt packages.
@zvrba As an aside, we definitely support that in Vcpkg by just setting the MSBuild property VcpkgConfiguration to Release in your project under your "RelNoOpt" configuration.
We can also make a nice, standalone folder for you to check into SVN via vcpkg export --raw <packages>!
Oh, thanks for the vcpkg export tip. Didn't know it could do that!
Thanks again for this feedback.The commit referenced above should fix this.