Community Tip - You can change your system assigned username to something more personal in your community settings. X
For a lightweight data broker collecting field data and sending it into Thingworx I wish to use the C SDK. The underlying hardware runs a custom embedded linux and I have a cross-compiler on a host system with Ubuntu 14.04. I am developing my application in C++.
The optimal solution in my point of view would be that I can treat the SDK like a library: Compiling the bare SDK code into a shared library, include all necessary header files in my project and link against the .so. Am I missing something critical here? Is that even possible in the first place? I figured that the SDK has a dependency to an OpenSSL distribution at least, are there more external libraries to be regarded?
I have to admit that I haven't used CMake until now and struggle a little to understand how I can include the SDK into my Eclipse project using the simple GNU make builder. Also, it'd be awesome to have different build profiles (actually I have two right now, one that compiles a slimmed version to debug on the host system and another one for the target).
Any hint on how to accomplish the implementation on the custom linux target or general experiences with such setups is greatly appreciated!
Solved! Go to Solution.
For those, interested in the matter: I figured it out myself. Now I can use the C SDK as standalone library, even integrated in C++.
The following needs to be done to crosscompile the SDK and to use it as library:
$ cmake .. -D <options of enabled SDK components> -DPLATFORM=emlinux -DCMAKE_INSTALL_PREFIX=/path/to/target/lib/folder/on/host $ make $ sudo make installThe available options for compiling the SDK are documented in the Developer Guide.
-ltwCSdk -L/path/to/target/lib/folder/on/hostcompiler options.
If you want to compile for your host system, too, just the CMake usage differs, as the adjustments still need to be done.
For those, interested in the matter: I figured it out myself. Now I can use the C SDK as standalone library, even integrated in C++.
The following needs to be done to crosscompile the SDK and to use it as library:
$ cmake .. -D <options of enabled SDK components> -DPLATFORM=emlinux -DCMAKE_INSTALL_PREFIX=/path/to/target/lib/folder/on/host $ make $ sudo make installThe available options for compiling the SDK are documented in the Developer Guide.
-ltwCSdk -L/path/to/target/lib/folder/on/hostcompiler options.
If you want to compile for your host system, too, just the CMake usage differs, as the adjustments still need to be done.