cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Learn all about PTC Community Badges. Engage with PTC and see how many you can earn! X

"twBaseTypes.h":No Such file or directory

CHASEONHO
18-Opal

"twBaseTypes.h":No Such file or directory

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

ACCEPTED SOLUTION

Accepted Solutions
mtyago
13-Aquamarine
(To:supandey)
24 REPLIES 24
dupatel
19-Tanzanite
(To:CHASEONHO)

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

mtyago
13-Aquamarine
(To:dupatel)

Is this issue resolved?

 

If Yes, kindly post the solution, as I am facing exactly the same issue.

 

Thanks

supandey
19-Tanzanite
(To:mtyago)

@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

supandey
19-Tanzanite
(To:CHASEONHO)

Ok that explains the issue with file not found.

mtyago
13-Aquamarine
(To:supandey)

With C SDK ..No.

I see inconsistencies between "C SDK Setup Guide" and files found in the latest downloaded SDK itself.

 

supandey
19-Tanzanite
(To:mtyago)

@mtyago what sort of inconsistencies? Did your build finish successfully prior to launching the C SDK based example application?

mtyago
13-Aquamarine
(To:supandey)

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

 

supandey
19-Tanzanite
(To:mtyago)

@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
13-Aquamarine
(To:supandey)

supandey
19-Tanzanite
(To:supandey)

@mtyago could you share what kind of errors you are running into when building the examples? For which platform are you building?

mtyago
13-Aquamarine
(To:supandey)

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

supandey
19-Tanzanite
(To:mtyago)

@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 

01-06-2018 08-53-51.jpg

 

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.

 

 

mtyago
13-Aquamarine
(To:supandey)

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

 

 

 

supandey
19-Tanzanite
(To:mtyago)

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 :)

mtyago
13-Aquamarine
(To:supandey)

 

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

supandey
19-Tanzanite
(To:mtyago)

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.

mtyago
13-Aquamarine
(To:supandey)

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

 

supandey
19-Tanzanite
(To:mtyago)

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

supandey
19-Tanzanite
(To:AkshayKumar)

Hi @AkshayKumar you might want to review this blog

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

 

https://community.ptc.com/t5/ThingWorx-Developers/Using-the-C-SDK-to-Deliver-Data-to-ThingWorx-from-a-Raspberry-PI/m-p/557861/highlight/false

Its Working fine now.

Thanks, :)

 

Regards,

Akshay

Announcements


Top Tags