missing binary operator before token "("

Hello every one,

how are u doing?

my macine has following os:

Linux 2.6.18-53.el5 #1 SMP Wed Oct 10 16:34:19 EDT 2007 x86_64 x86_64 x86_64 GNU/Linux

here i am trying to compile a c++ project.i am getting the following error.

error:
=======

Generating IMPORT_IDL... .h cstub sstub
from /root/cc/unix-ce/root/subsys/idl/cdbo_0000.idl
(cd /root/cc/unix-ce/root/subsys/cb/cdbg/obj_CompSched_csvON/Linux/; /opt/dce/bin/idl -keep all -I/root/cc/unix-ce/root/subsys/cb/cdbg/obj_CompSched_csvON/Linux/ -I/root/cc/unix-ce/root/subsys/lib/Linux -I/root/cc/unix-ce/root/subsys/cb/cdbg/idl -I/root/cc/unix-ce/root/subsys/cb/cdbg/include -I/root/cc/unix-ce/root/subsys/idl -I/root/cc/unix-ce/root/subsys/include -I/opt/dce/include -I/opt/dce/include/dce -DUSE_FREE_DCE -I/opt/dce/include -DLINUX -DUSE_SHADOW -DUCE_SSH -DIDL_CHAR_IS_CHAR -D_REENTRANT /root/cc/unix-ce/root/subsys/idl/cdbo_0000.idl)

Create /root/cc/unix-ce/root/subsys/cb/cdbg/obj_CompSched_csvON/Linux//cdbg_CDBSP_config.dep from cdbg_CDBSP_config.cc
/usr/bin/c++ -M -g -DDEBUG -DMAT -I//root/cc/unix-ce/mvfs/3pp/rogueTools.h/v7.0.3/ -I/root/cc/unix-ce/root/subsys/cb/cdbg/src -I/root/cc/unix-ce/root/subsys/cb/cdbg/obj_CompSched_csvON/Linux/ -I/root/cc/unix-ce/root/subsys/lib/Linux -I/root/cc/unix-ce/root/subsys/cb/cdbg/include -I/root/cc/unix-ce/root/subsys/include -I/opt/dce/include -I/opt/dce/include/dce -DUSE_FREE_DCE -I/root/cc/unix-ce/root/3pp/include/Linux -D_GNU_SOURCE -DLINUX -DUSE_SHADOW -DUCE_SSH -DIDL_CHAR_IS_CHAR -D_REENTRANT -fsigned-char -DCXX_VERSION=4.1.2 -DRW_MULTI_THREAD -DSNACC_DEEP_COPY -DSWP_CDBG_CompSched_csvON cdbg_CDBSP_config.cc > /root/cc/unix-ce/root/subsys/cb/cdbg/obj_CompSched_csvON/Linux//cdbg_CDBSP_config.dep

Create /root/cc/unix-ce/root/subsys/cb/cdbg/obj_CompSched_csvON/Linux//cdbg_COMPSP_cdbRS.dep from cdbg_COMPSP_cdbRS.C
/usr/bin/c++ -M -g -DDEBUG -DMAT -I//root/cc/unix-ce/mvfs/3pp/rogueTools.h/v7.0.3/ -I/root/cc/unix-ce/root/subsys/cb/cdbg/src -I/root/cc/unix-ce/root/subsys/cb/cdbg/obj_CompSched_csvON/Linux/ -I/root/cc/unix-ce/root/subsys/lib/Linux -I/root/cc/unix-ce/root/subsys/cb/cdbg/include -I/root/cc/unix-ce/root/subsys/include -I/opt/dce/include -I/opt/dce/include/dce -DUSE_FREE_DCE -I/root/cc/unix-ce/root/3pp/include/Linux -D_GNU_SOURCE -DLINUX -DUSE_SHADOW -DUCE_SSH -DIDL_CHAR_IS_CHAR -D_REENTRANT -fsigned-char -DCXX_VERSION=4.1.2 -DRW_MULTI_THREAD -DSNACC_DEEP_COPY -DSWP_CDBG_CompSched_csvON cdbg_COMPSP_cdbRS.C > /root/cc/unix-ce/root/subsys/cb/cdbg/obj_CompSched_csvON/Linux//cdbg_COMPSP_cdbRS.dep
cdbg_COMPSP_cdbRS.C:25:45: error: missing binary operator before token "("*** Error code 1clearmake: Error: Build script failed for "/root/cc/unix-ce/root/subsys/cb/cdbg/obj_CompSched_csvON/Linux//cdbg_COMPSP_cdbRS.dep"
================================================== ========

in line number 25 i had the following code
==================================
#if defined (HAVE_GCC) && (HAVE_GCC_VERSION)(3,2)

I have googled to get the solution ,many people got this kind of error but i haven't find any solution to this error.

pls can some of you help me regarding this.

with regards
Srinivas mannam

Here is something from /usr/include/ansidecl.h. Adapt it for your project.

/* Using MACRO(x,y) in cpp #if conditionals does not work with some
   older preprocessors.  Thus we can't define something like this:

#define HAVE_GCC_VERSION(MAJOR, MINOR) \
  (__GNUC__ > (MAJOR) || (__GNUC__ == (MAJOR) && __GNUC_MINOR__ >= (MINOR)))

and then test "#if HAVE_GCC_VERSION(2,7)".

So instead we use the macro below and test it against specific values. */

/* This macro simplifies testing whether we are using gcc, and if it
is of a particular minimum version. (Both major & minor numbers are
significant.) This macro will evaluate to 0 if we are not using
gcc at all. /
#ifndef GCC_VERSION
#define GCC_VERSION (__GNUC__ * 1000 + __GNUC_MINOR__)
#endif /
GCC_VERSION */
[/CODE]

Use GCC_VERSION as

#if (GCC_VERSION >= 3002)
your definitions here
#endif

Hello vino,

thanks alot for u r reply.

it's working.

pls clarify why we are using gcc version greater than 3002.

kind regards,
Srinivas mannam

Read the comments in the snippet vino posted.

Request you to read the comments I had provided earlier.