Community Tip - Learn all about PTC Community Badges. Engage with PTC and see how many you can earn! X
hi, i'm beginner both thingworx and C language
i download C SDK in marketplace
and download/install visual studio
after i open VsDevCmd and move SteamSensor dir
command cl main.c[changed appkey and port]
so i copy and paste header&c file in C SDK\src\...
after that dir look like following picture
but still command cl main.c appear error [but header file has changed]
how do fix it?
Has anyone experienced the same issue as me?
please help me . thanks
Solved! Go to Solution.
seonho Cha: I can see the issue at my end and will check further on the "twBaseTypes.h":No Such file or directory error.
-Durgesh
Is this issue resolved?
If Yes, kindly post the solution, as I am facing exactly the same issue.
Thanks
@mtyago & @CHASEONHO were you able to make the build for windows OS successfully?
Building with the C SDK eventually failed.
I switched to the JAVA SDK.
I switched to using the MQTT extension.
Currently, MQTT is used to connect ThingWorx with objects.
thank
Ok that explains the issue with file not found.
With C SDK ..No.
I see inconsistencies between "C SDK Setup Guide" and files found in the latest downloaded SDK itself.
@mtyago what sort of inconsistencies? Did your build finish successfully prior to launching the C SDK based example application?
I could not build the sdk.
I was able to build the VS solution file, but the project requires "twCSdk.lib" in order to finish the build.
And there is no twCSdk.lib present in any of the downloaded folder.
As far as inconsistencies are concerned
The document mentions "At the top level, locate the folder entitled tw-c-sdk." there is no such folder, further the solution name would be "tw-c-sdk.sln" which is not true as well.
Naming issues are minor, but it seems the document is not updated.
However the major problem is that twCSdk.lib is missing.
Regards
Manas
@mtyago thanks for highlighting this. Could you point me to the source link from where you have downloaded the C SDK? I'll check that out.
@mtyago could you share what kind of errors you are running into when building the examples? For which platform are you building?
It seems there is a change in https://developer.thingworx.com/resources/guides/thingworx-c-sdk-setup-guide since I last checked it. On the first page of the guide, there was a C_SDK.zip link.
But anyways, let's start with the issues one at a time.
Now coming back to the guide, in Test connectivity section, I see an instruction "At the top level, locate the folder entitled tw-c-sdk" , which folder's top level is being referred? and there is no tw-c-sdk folder anyways
@mtyago I think it just mean you need to navigate to the top directory under which all the C SDK content is stored. I haven't downloaded the package from the Marketplace, but if i need to give you the example it could be something like this
You just need to navigate under this main folder > examples > SteamSensor (if you are working with steam sensor) > src , and under src/ you will find the main.c . If you are working with visual studio just CD to this location on a command prompt and then key in the start main.c . Assuming you are working on Windows platform with Visual studio, the file will automatically open in that.
BTW, I could reproduce the issue you are running into i.e. the macro issue and then not being able to locate the twCSDK.lib . I think build is failing if you are working with higher visual studio version than 2012. Therefore, I would say test with 2012 Visual Studio see if you still run into sprintf macro error.
Apologies for late reply.
I have not tried your solution, but I managed to solve the problem in a similar fashion i.e. by navigating to the top folder and running cmake, instead of running cmake in the "example/steamsensor" folder as mentioned in the document. I am not sure if it was just me who misunderstood the documentation, but its solved now.
Regards,
manas
I'm not sure what syntax you had for the cmake and on which level but it has to run from the top level as that's it finds the CMakeLists.txt require to run the cmake.
Good to know its working for you now :)
By the way, can you check if there is CMakeLists.txt in the c_sdk.zip,I could not find it, as it is required in order to run the cmake , as per tutorial ( https://developer.thingworx.com/resources/guides/thingworx-c-sdk-tutorial/sample-code-c-sdk-tutorial)
Regards
Manas
There is, you might be looking into the examples download, which only provides simple examples - but the C SDK download contains the required cmake list.
Yes, there is cmake file for csdk download, but for examples, this cmake is not the correct one.
There are no entries for "exampleclient" project example. Sorry to bother you, but i think it would be better if correct cmake file is provided, or at least a hint to modify the cmake should be there
Thanks @mtyago for the feedback. Can you highlight what changes you needed to make in this file? I will check for the resource who can help us in updating this resource for examples on C SDK.
Still i am facing same issue.If solved please suggest me what steps you have gone through!
Regars,
Akshay
Hi,
I have tried that already but getting error like this
"./SteamSensor: error while loading shared libraries: libssl.so.1.0.0: cannot open shared object file: No such file or directory"
I have attached a Snap.
Regards,
Akshay
I have already uploaded main.c files ,twLinux.h files and some snaps to one of your blog in the link
Its Working fine now.
Thanks, :)
Regards,
Akshay