missing binary operator before token "("


 
Thread Tools Search this Thread
Operating Systems Linux missing binary operator before token "("
# 1  
Old 08-07-2008
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.

Code:
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 1[/color]clearmake: 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
# 2  
Old 08-07-2008
Quote:
Originally Posted by mannam srinivas
in line number 25 i had the following code
Code:
==================================
#if defined (HAVE_GCC) && (HAVE_GCC_VERSION)(3,2)


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

Code:
/* Using MACRO(x,y) in cpp #if conditionals does not work with some
   older preprocessors.  Thus we can't define something like this:
Code:
#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 */

Use GCC_VERSION as

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

# 3  
Old 08-07-2008
missing binary operator before token "("

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
# 4  
Old 08-07-2008
Read the comments in the snippet vino posted.
# 5  
Old 08-07-2008
Quote:
Originally Posted by mannam srinivas
pls clarify why we are using gcc version greater than 3002.
Request you to read the comments I had provided earlier.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Bash script - Print an ascii file using specific font "Latin Modern Mono 12" "regular" "9"

Hello. System : opensuse leap 42.3 I have a bash script that build a text file. I would like the last command doing : print_cmd -o page-left=43 -o page-right=22 -o page-top=28 -o page-bottom=43 -o font=LatinModernMono12:regular:9 some_file.txt where : print_cmd ::= some printing... (1 Reply)
Discussion started by: jcdole
1 Replies

2. Shell Programming and Scripting

Syntax error near unexpected token `"Hit <ENTER> to continue:"'

the below code will search attr string inside makefile under the modelno on given path. echo "Enter model no for searching string inside makefile" read inputs2 #find /pools/home_unix/sapte/work/models/model/$inputs2 -name "makefile" | xargs grep "attr" \; #;;I am getting below error.... (7 Replies)
Discussion started by: lathigara
7 Replies

3. Shell Programming and Scripting

operand expected (error token is "<")

Hi, i am getting error from below script. Error: s1.sh: line 19: ((: j<: syntax error: operand expected (error token is "<") #!/bin/bash str=$(ps -eaf | grep smon | grep -v grep | awk ' {print $8}' | cut -c10-18) i=1 while do temp=`echo $str|awk '{print $"'$i'"}'` ... (12 Replies)
Discussion started by: lakshmikanthe
12 Replies

4. UNIX for Dummies Questions & Answers

"binary operator exected" problem

Hey guys/gals, Am having trouble getting an 'if statement' to play nice.. I am playing with a script and need 'if' to check whether "y" or "Y" has been entered and if not to exit. In previous scripts I was playing with there would normally be a Y and a N response possibility so each... (2 Replies)
Discussion started by: TAPE
2 Replies

5. Shell Programming and Scripting

awk command to replace ";" with "|" and ""|" at diferent places in line of file

Hi, I have line in input file as below: 3G_CENTRAL;INDONESIA_(M)_TELKOMSEL;SPECIAL_WORLD_GRP_7_FA_2_TELKOMSEL My expected output for line in the file must be : "1-Radon1-cMOC_deg"|"LDIndex"|"3G_CENTRAL|INDONESIA_(M)_TELKOMSEL"|LAST|"SPECIAL_WORLD_GRP_7_FA_2_TELKOMSEL" Can someone... (7 Replies)
Discussion started by: shis100
7 Replies

6. Shell Programming and Scripting

What "-a" operator means in "if" statement

Hi I am trying to figure out what the following line does, I work in ksh88: ] && LIST="$big $LIST" Not sure what "-a" means in that case. Thanks a lot for any advice -A (1 Reply)
Discussion started by: aoussenko
1 Replies

7. Shell Programming and Scripting

cannot properly employ "or" operator in an if statement (bash)

Hi, I have a variable, $sername, and I would like to display this variable only if it *does not* contain either of these two tags: *DTI*FA* or *DIFF*FA*. I think the syntax for my 'or' operator is off. The variable $sername is continuously changing in an outer loop (not shown), but at the... (4 Replies)
Discussion started by: goodbenito
4 Replies

8. Shell Programming and Scripting

error "test: [-d: unary operator expected" very confused.

Im trying to check if a series of directory exists and if not create them, and am having issues. All the instances of test return with the error "test: #!/bin/bash location_Parent=~/Documents/sight_of_sound location_IMG=~/Documents/Sight_of_sound/IMG location_AUD=~/Documents/Sight_of_sound/AUD... (4 Replies)
Discussion started by: orionrush
4 Replies

9. Shell Programming and Scripting

How can I use a pipe operator in a variable: OPTION="| command"?

I have a string of commands I am piping some data through and I want to allow command line switches to select which commands are used. I want to do something like this: OPTION="| command3" command1 -a -b c.txt | command2 -d -e $OPTION >result.txt I want to do it that way because OPTION may be... (1 Reply)
Discussion started by: KenJackson
1 Replies

10. Solaris

"syntax error near unexpected token `fi' "

one of my script as follows HOME=/apps/logs mv $HOME/cron.log $HOME/cron.log.`date +%Y-%m-%d` touch $HOME/cron.log fi i am getting error as follows on the last line we are getting ... "syntax error near unexpected token `fi' " please suggest.... (4 Replies)
Discussion started by: GIC1986
4 Replies
Login or Register to Ask a Question