Error: missing binary operator before token [AJTCL]

asked 2015-04-13 08:05:22 -0800

iker gravatar image

updated 2015-04-13 08:07:22 -0800

I am trying to build an AJTCL simple app without using scons and with a custom Makefile. I am having this errors and i do not know if i need to add any kind of flag to compiler..

/usr/include/ajtcl/aj_msg.h:65:5: error: missing binary operator before token "1"
/usr/include/ajtcl/aj_config.h:91:5: error: missing binary operator before token "0"
/usr/include/ajtcl/aj_config.h:93:7: error: missing binary operator before token "1"

The code that makes the error is

#if HOST_IS_LITTLE_ENDIAN
#define HOST_ENDIANESS AJ_LITTLE_ENDIAN
#elif HOST_IS_BIG_ENDIAN
#define HOST_ENDIANESS AJ_BIG_ENDIAN
#endif

Regards.

edit retag flag offensive close merge delete

Comments

What system are you building for and what compiler are you using?

jprestwo ( 2015-04-13 09:22:27 -0800 )edit

SO: OpenWRT Platform: ar71xx Compiler: mips-openwrt-linux-uclibc-gcc | gcc version 4.6.3 20120201 (prerelease) (Linaro GCC 4.6-2012.02

iker ( 2015-04-13 09:44:18 -0800 )edit

In your Makefile, you should define HOST_IS_LITTLE_ENDIAN to 0 and HOST_IS_BIG_ENDIAN to 1. Are you doing that? That is how it is done with our builder (scons). Also, thin client already supports openWRT. We have several feeds for ajtcl, base_tcl, alljoyn-js etc. Any reason why you are building it yourself?

jprestwo ( 2015-04-13 11:09:49 -0800 )edit

I defined it on the code and i get /usr/include/ajtcl/aj_target.h:52:0: warning: "HOST_IS_LITTLE_ENDIAN" redefined [enabled by default] /usr/include/ajtcl/aj_target.h:53:0: warning: "HOST_IS_BIG_ENDIAN" redefined [enabled by default] But i will try to add them on the Makefile as you has recommend me. Yes, the AJTCL is installed using openwrt feed and scons but now i am writing an app/plugin that uses ajtcl and so i get this errors when i add ajtcl headers on my code

iker ( 2015-04-14 00:35:48 -0800 )edit