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 the Community Ranking System, a fun gamification element of the PTC Community. X

unknown type name while compiling C SDK

SS_10329829
4-Participant

unknown type name while compiling C SDK

Hello community,

 

I am newbie to C SDK program and I use Linux odroid 4.9.277-122 aarch64 GNU/Linux. I compiled the C SDK program using make PLATFORM=gcc-linux-x86-64 BUILD=release In my main.C it use twMessages, twMessaging, twApi header files and I got the following error.

 

In file included from ../src/twMessages.h:13,
                 from ../src/twMessaging.h:7,
                 from ../src/twApi.h:21,
                 from ../src/main.c:99:
../src/twInfoTable.h:88:2: error: unknown type name 'twList'
   88 |  twList * aspects;   /**< A ::twList of the aspects associated with the entry. **/
      |  ^~~~~~
../src/twMessages.h:68:2: error: unknown type name 'twList'
   68 |  twList * headers;
      |  ^~~~~~
../src/twApi.h:166:2: error: unknown type name 'twList'
  166 |  twList * bindEventCallbackList;          /**< Pointer to a ::twList of bind event callbacks. **/
      |  ^~~~~~

In file included from ../src/main.c:99:
../src/twApi.h:30:22: error: unknown type name 'twList'; use 'struct' keyword to refer to the type
   30 | #define propertyList twList /* A propertyList is a twList */

I can compile the same C SDK program in the 32 bit processor (armv71). 

 

May I know why it gives unknown type name in the header file when I compile in aarch64 processor and how can I solve the issue?

 

May I know what platform should I use for 64bit processor (aarch64)? I have the following platform inside the build/platform folder.

win32-openssl

win32-dll

win32

gcc-osx-x86-64-openssl

gcc-osx-x86-64

gcc-linux-x86-64-openssl

gcc-linux-x86-64-cross-openssl

gcc-linux-x86-64-cross

gcc-linux-x86-64

gcc-linux-x86-32-openssl

gcc-linux-x86-32-cross-openssl

gcc-linux-x86-32-cross

gcc-linux-x86-32

gcc-linux-coldfire-cross

gcc-linux-arm-openssl

gcc-linux-arm-hwfpu-openssl

gcc-linux-arm-hwfpu-cross-openssl

gcc-linux-arm-hwfpu-cross

gcc-linux-arm-hwfpu

gcc-linux-arm-cross-openssl

gcc-linux-arm-cross

gcc-linux-arm

 

Because in the 32 bit processor (armv71), "gcc-linux-arm" platform is used to compile the C SDK program. When I use the same platform in 64 bit processor (aarch64), I got the following error.

 

/usr/bin/gcc -fvisibility=hidden  -DTW_OS_INCLUDE='"twLinux.h"' -Wall -mstructure-size-boundary=32 -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -DCC_GNU -pthread -fPIC -ffunction-sections -fdata-sections -DENABLE_TASKER=1     -DOFFLINE_MSG_STORE=1  -Os -s -fno-asynchronous-unwind-tables -Wl,--strip-all -Wno-pointer-sign -I ../src -I ../src/api -I ../src/config -I ../src/fileTransfer -I ../src/messaging -I ../src/porting -I ../src/tls -I ../src/utils -I ../src/websocket -I ../src/tunneling -I ../src/subscribedProps -I ../src/stubs -I ../src/thirdParty/axTLS/ssl -I ../src/thirdParty/axTLS/crypto -I ../src/thirdParty/axTLS/config -I ../src/thirdParty/axTLS -I ../src/thirdParty/libcfu/src -I ../src/thirdParty/cJSON -I ../src/thirdParty/libcfu/src -I ../src/thirdParty/tomcrypt/src/headers -I ../src/thirdParty/ntlm -I ../src/thirdParty/wildcard                        -DLTC_NO_ROLC      -c ../src/thirdParty/axTLS/crypto/aes.c
gcc: error: unrecognized command line option '-mstructure-size-boundary=32'

 

I want to know how can I compile the C SDK program in linux 64 bit processor (aarch64)? 

May I know where can I check what C SDK version and CMake version I am using?

 

Thank you.

1 ACCEPTED SOLUTION

Accepted Solutions
slangley
23-Emerald II
(To:SS_10329829)

HI @SS_10329829.

 

Here are some things that come to mind:

 

  • You're using a 32-bit library on a 64-bit platform
  • You have missing libraries

 

The C SDK version is designated in the download filename.  You should be able to find the cmake version by running this command:  cmake --version

 

You might want to check out the Help Center.  There is a Quick Start guide and other information that may be helpful.

 

Regards.

 

--Sharon

View solution in original post

1 REPLY 1
slangley
23-Emerald II
(To:SS_10329829)

HI @SS_10329829.

 

Here are some things that come to mind:

 

  • You're using a 32-bit library on a 64-bit platform
  • You have missing libraries

 

The C SDK version is designated in the download filename.  You should be able to find the cmake version by running this command:  cmake --version

 

You might want to check out the Help Center.  There is a Quick Start guide and other information that may be helpful.

 

Regards.

 

--Sharon

Top Tags