Sponsored Content
Full Discussion: C Question compilation error
Top Forums Programming C Question compilation error Post 302194133 by jaganreddy on Monday 12th of May 2008 09:40:40 AM
Old 05-12-2008
C Question compilation error

What does the following mean:


state_field state_abvr[] = {
"AL","ALABAMA",
"AK","ALASKA",
.
.
.
};

extern state_field state_abvr[];
issues we
I am facing following compilation issue


bosdf9d1:root make
CC -I/bto/bcs/shared/include -I/bto/sys/BCS/usr/include -I/usr/include -I/bto/bcs/archive/maint -I/usr/local/include -lc -lPW -I/usr/include/X11R5 -I/usr/include/Motif1.2 -c cd_main.c
CC: "cd_globals.c", line 28: error: state_field state_abvr: state_field is not a type name (1314)
CC: "cd_globals.c", line 82: error: syntax error: type expected for array state_abvr (1447)
CC: "cd_globals.c", line 28: error: bad initializer type for ::state_abvr: char [3] (int expected) (1106)
CC: "cd_globals.c", line 28: error: bad initializer type for ::state_abvr: char [8] (int expected) (1106)
CC: "cd_globals.c", line 28: error: bad initializer type for ::state_abvr: char [3] (int expected) (1106)
CC: "cd_globals.c", line 28: error: bad initializer type for ::state_abvr: char [7] (int expected) (1106)
CC: "cd_globals.c", line 28: error: bad initializer type for ::state_abvr: char [3] (int expected) (1106)
CC: "cd_globals.c", line 28: error: bad initializer type for ::state_abvr: char [8] (int expected) (1106)
CC: "cd_globals.c", line 28: error: bad initializer type for ::state_abvr: char [3] (int expected) (1106)
CC: "cd_globals.c", line 28: error: bad initializer type for ::state_abvr: char [9] (int expected) (1106)
CC: "cd_globals.c", line 28: error: bad initializer type for ::state_abvr: char [3] (int expected) (1106)
CC: "cd_globals.c", line 28: error: bad initializer type for ::state_abvr: char [11] (int expected) (1106)
CC: "cd_globals.c", line 28: error: bad initializer type for ::state_abvr: char [3] (int expected) (1106)
CC: "cd_globals.c", line 28: error: bad initializer type for ::state_abvr: char [9] (int expected) (1106)
CC: sorry, too many errors
*** Error exit code 1

Stop.


please help me
 

10 More Discussions You Might Find Interesting

1. Programming

Regarding compilation error.

Hi All, I facing the following compilation error; when I implementing the following logic. ostrstream ostr; ostr << (( scAxsm.getRecord( i ).getField( 2 ).getShort())%12)!=0?(( scAxsm.getRecord( i ).getField( 2 ).getShort())/12+1) : (( scAxsm.getRecord( i ).getField( 2 ).getShort())/12) <<... (1 Reply)
Discussion started by: sweta
1 Replies

2. Programming

compilation error

Hi, While trying compile a C++ file in UNIX with gcc whose make rule involves the usage of /usr/ccs/bin/as, I get the following error: /usr/ccs/bin/as: No such file or directory /usr/ccs/bin/as: error: write error on output file "<filename>.o" *** Error code 1 clearmake: Error: Build... (2 Replies)
Discussion started by: smanu
2 Replies

3. Programming

question on conditional compilation

Hey, can I #define something outside the source file ? I have a C program which uses #ifdef.. #ifdef ABC ... do this.. #else ... that ... #endif The usual way that I know of defining ABC is in the source/header file #define ABC But is there any other way to do that ? Maybe as... (2 Replies)
Discussion started by: the_learner
2 Replies

4. Programming

Compilation error

I am compiling a software xchm on solaris 10. First i run './configure' There is no error. But when i start compiling using 'gmake' following error shown /usr/local/include/wx-2.6/wx/x11/brush.h: In copy constructor `wxBrush::wxBrush(const wxBrush&)':... (3 Replies)
Discussion started by: mansoorulhaq
3 Replies

5. Linux

c++ compilation error

Hello every one, here i am attempting to compile a c++ module using gcc.it is throwing a error . error: ==== > make -S dummyCHARGP /usr/local/bin/gcc -g -DDEBUG -DMAT -I. -I/swtemp/usbs/cc/unix-ce/root/subsys/lib/Linux/ -I/opt/dce/include -I/opt/dce/include/dce ... (12 Replies)
Discussion started by: mannam srinivas
12 Replies

6. HP-UX

compilation error

hello everyone, here i am attempting to compile a c++ submodule.OS is HP-UX. here i am getting the following error. ====================================== "Make: Don't know how to make compile. Stop." =================================== could you pls somebody suggest why this error is... (2 Replies)
Discussion started by: mannam srinivas
2 Replies

7. Programming

compilation error while using cygwin

Hello, I am trying to compile a C program from Cygwin and it gives ld: not found -user32 error .. I searched for library libuser32.so and was not able locate it.. When i create only object file using gcc -c option it gets created successfully .. When i use gcc -o option , executable is not... (4 Replies)
Discussion started by: shafi2all
4 Replies

8. Programming

Compilation error : Please help

state_field state_abvr = { "AL","ALABAMA", "AK","ALASKA", "AZ","ARIZONA", "AR","ARKANSAS", "CA","CALIFORNIA", "CO","COLORADO", "CT","CONNECTICUT", "DE","DELAWARE", "DC","DISTRICT-OF-COLUMBIA", "FL","FLORIDA", "GA","GEORGIA", "HI","HAWAII", "ID","IDAHO", "IL","ILLINOIS",... (1 Reply)
Discussion started by: jagan_kalluri
1 Replies

9. Programming

Compilation Error

I am getting the below given errors for the following program though all the variables have been declared and used appropriately. Please Help. The environment is AIX. Error: ------ "gbsizeprofile.c", line 67.4: 1506-275 (S) Unexpected text 'void' encountered. "gbsizeprofile.c", line 67.10:... (2 Replies)
Discussion started by: yschd
2 Replies

10. Programming

Java compilation error

i am on red hat Linux . package hiveudf; import org.apache.hadoop.hive.ql.exec.UDF; import org.apache.hadoop.io.Text; public class lowercaseudf extends UDF { public Text evaluate(final Text s) { if (s == null) { return null;} return new... (4 Replies)
Discussion started by: boncuk
4 Replies
Ops(3)							User Contributed Perl Documentation						    Ops(3)

NAME
PDL::Ops - Fundamental mathematical operators DESCRIPTION
This module provides the functions used by PDL to overload the basic mathematical operators ("+ - / *" etc.) and functions ("sin sqrt" etc.) It also includes the function "log10", which should be a perl function so that we can overload it! Matrix multiplication (the operator "x") is handled by the module PDL::Primitive. SYNOPSIS
none FUNCTIONS
plus Signature: (a(); b(); [o]c(); int swap) add two piddles $c = plus $a, $b, 0; # explicit call with trailing 0 $c = $a + $b; # overloaded call $a->inplace->plus($b,0); # modify $a inplace It can be made to work inplace with the "$a->inplace" syntax. This function is used to overload the binary "+" operator. Note that when calling this function explicitly you need to supply a third argument that should generally be zero (see first example). This restriction is expected to go away in future releases. plus does handle bad values. The state of the bad-value flag of the output piddles is unknown. mult Signature: (a(); b(); [o]c(); int swap) multiply two piddles $c = mult $a, $b, 0; # explicit call with trailing 0 $c = $a * $b; # overloaded call $a->inplace->mult($b,0); # modify $a inplace It can be made to work inplace with the "$a->inplace" syntax. This function is used to overload the binary "*" operator. Note that when calling this function explicitly you need to supply a third argument that should generally be zero (see first example). This restriction is expected to go away in future releases. mult does handle bad values. The state of the bad-value flag of the output piddles is unknown. minus Signature: (a(); b(); [o]c(); int swap) subtract two piddles $c = minus $a, $b, 0; # explicit call with trailing 0 $c = $a - $b; # overloaded call $a->inplace->minus($b,0); # modify $a inplace It can be made to work inplace with the "$a->inplace" syntax. This function is used to overload the binary "-" operator. Note that when calling this function explicitly you need to supply a third argument that should generally be zero (see first example). This restriction is expected to go away in future releases. minus does handle bad values. The state of the bad-value flag of the output piddles is unknown. divide Signature: (a(); b(); [o]c(); int swap) divide two piddles $c = divide $a, $b, 0; # explicit call with trailing 0 $c = $a / $b; # overloaded call $a->inplace->divide($b,0); # modify $a inplace It can be made to work inplace with the "$a->inplace" syntax. This function is used to overload the binary "/" operator. Note that when calling this function explicitly you need to supply a third argument that should generally be zero (see first example). This restriction is expected to go away in future releases. divide does handle bad values. The state of the bad-value flag of the output piddles is unknown. gt Signature: (a(); b(); [o]c(); int swap) the binary > (greater than) operation $c = gt $a, $b, 0; # explicit call with trailing 0 $c = $a > $b; # overloaded call $a->inplace->gt($b,0); # modify $a inplace It can be made to work inplace with the "$a->inplace" syntax. This function is used to overload the binary ">" operator. Note that when calling this function explicitly you need to supply a third argument that should generally be zero (see first example). This restriction is expected to go away in future releases. gt does handle bad values. The state of the bad-value flag of the output piddles is unknown. lt Signature: (a(); b(); [o]c(); int swap) the binary < (less than) operation $c = lt $a, $b, 0; # explicit call with trailing 0 $c = $a < $b; # overloaded call $a->inplace->lt($b,0); # modify $a inplace It can be made to work inplace with the "$a->inplace" syntax. This function is used to overload the binary "<" operator. Note that when calling this function explicitly you need to supply a third argument that should generally be zero (see first example). This restriction is expected to go away in future releases. lt does handle bad values. The state of the bad-value flag of the output piddles is unknown. le Signature: (a(); b(); [o]c(); int swap) the binary <= (less equal) operation $c = le $a, $b, 0; # explicit call with trailing 0 $c = $a <= $b; # overloaded call $a->inplace->le($b,0); # modify $a inplace It can be made to work inplace with the "$a->inplace" syntax. This function is used to overload the binary "<=" operator. Note that when calling this function explicitly you need to supply a third argument that should generally be zero (see first example). This restriction is expected to go away in future releases. le does handle bad values. The state of the bad-value flag of the output piddles is unknown. ge Signature: (a(); b(); [o]c(); int swap) the binary >= (greater equal) operation $c = ge $a, $b, 0; # explicit call with trailing 0 $c = $a >= $b; # overloaded call $a->inplace->ge($b,0); # modify $a inplace It can be made to work inplace with the "$a->inplace" syntax. This function is used to overload the binary ">=" operator. Note that when calling this function explicitly you need to supply a third argument that should generally be zero (see first example). This restriction is expected to go away in future releases. ge does handle bad values. The state of the bad-value flag of the output piddles is unknown. eq Signature: (a(); b(); [o]c(); int swap) binary equal to operation ("==") $c = eq $a, $b, 0; # explicit call with trailing 0 $c = $a == $b; # overloaded call $a->inplace->eq($b,0); # modify $a inplace It can be made to work inplace with the "$a->inplace" syntax. This function is used to overload the binary "==" operator. Note that when calling this function explicitly you need to supply a third argument that should generally be zero (see first example). This restriction is expected to go away in future releases. eq does handle bad values. The state of the bad-value flag of the output piddles is unknown. ne Signature: (a(); b(); [o]c(); int swap) binary not equal to operation ("!=") $c = ne $a, $b, 0; # explicit call with trailing 0 $c = $a != $b; # overloaded call $a->inplace->ne($b,0); # modify $a inplace It can be made to work inplace with the "$a->inplace" syntax. This function is used to overload the binary "!=" operator. Note that when calling this function explicitly you need to supply a third argument that should generally be zero (see first example). This restriction is expected to go away in future releases. ne does handle bad values. The state of the bad-value flag of the output piddles is unknown. shiftleft Signature: (a(); b(); [o]c(); int swap) leftshift "a$" by $b $c = shiftleft $a, $b, 0; # explicit call with trailing 0 $c = $a << $b; # overloaded call $a->inplace->shiftleft($b,0); # modify $a inplace It can be made to work inplace with the "$a->inplace" syntax. This function is used to overload the binary "<<" operator. Note that when calling this function explicitly you need to supply a third argument that should generally be zero (see first example). This restriction is expected to go away in future releases. shiftleft does handle bad values. The state of the bad-value flag of the output piddles is unknown. shiftright Signature: (a(); b(); [o]c(); int swap) leftshift "a$" by $b $c = shiftright $a, $b, 0; # explicit call with trailing 0 $c = $a >> $b; # overloaded call $a->inplace->shiftright($b,0); # modify $a inplace It can be made to work inplace with the "$a->inplace" syntax. This function is used to overload the binary ">>" operator. Note that when calling this function explicitly you need to supply a third argument that should generally be zero (see first example). This restriction is expected to go away in future releases. shiftright does handle bad values. The state of the bad-value flag of the output piddles is unknown. or2 Signature: (a(); b(); [o]c(); int swap) binary or of two piddles $c = or2 $a, $b, 0; # explicit call with trailing 0 $c = $a | $b; # overloaded call $a->inplace->or2($b,0); # modify $a inplace It can be made to work inplace with the "$a->inplace" syntax. This function is used to overload the binary "|" operator. Note that when calling this function explicitly you need to supply a third argument that should generally be zero (see first example). This restriction is expected to go away in future releases. or2 does handle bad values. The state of the bad-value flag of the output piddles is unknown. and2 Signature: (a(); b(); [o]c(); int swap) binary and of two piddles $c = and2 $a, $b, 0; # explicit call with trailing 0 $c = $a & $b; # overloaded call $a->inplace->and2($b,0); # modify $a inplace It can be made to work inplace with the "$a->inplace" syntax. This function is used to overload the binary "&" operator. Note that when calling this function explicitly you need to supply a third argument that should generally be zero (see first example). This restriction is expected to go away in future releases. and2 does handle bad values. The state of the bad-value flag of the output piddles is unknown. xor Signature: (a(); b(); [o]c(); int swap) binary exclusive or of two piddles $c = xor $a, $b, 0; # explicit call with trailing 0 $c = $a ^ $b; # overloaded call $a->inplace->xor($b,0); # modify $a inplace It can be made to work inplace with the "$a->inplace" syntax. This function is used to overload the binary "^" operator. Note that when calling this function explicitly you need to supply a third argument that should generally be zero (see first example). This restriction is expected to go away in future releases. xor does handle bad values. The state of the bad-value flag of the output piddles is unknown. bitnot Signature: (a(); [o]b()) unary bit negation $b = ~ $a; $a->inplace->bitnot; # modify $a inplace It can be made to work inplace with the "$a->inplace" syntax. This function is used to overload the unary "~" operator/function. bitnot does handle bad values. It will set the bad-value flag of all output piddles if the flag is set for any of the input piddles. power Signature: (a(); b(); [o]c(); int swap) raise piddle $a to the power "b" $c = $a->power($b,0); # explicit function call $c = $a ** $b; # overloaded use $a->inplace->power($b,0); # modify $a inplace It can be made to work inplace with the "$a->inplace" syntax. This function is used to overload the binary "**" function. Note that when calling this function explicitly you need to supply a third argument that should generally be zero (see first example). This restriction is expected to go away in future releases. power does handle bad values. The state of the bad-value flag of the output piddles is unknown. atan2 Signature: (a(); b(); [o]c(); int swap) elementwise "atan2" of two piddles $c = $a->atan2($b,0); # explicit function call $c = atan2 $a, $b; # overloaded use $a->inplace->atan2($b,0); # modify $a inplace It can be made to work inplace with the "$a->inplace" syntax. This function is used to overload the binary "atan2" function. Note that when calling this function explicitly you need to supply a third argument that should generally be zero (see first example). This restriction is expected to go away in future releases. atan2 does handle bad values. The state of the bad-value flag of the output piddles is unknown. modulo Signature: (a(); b(); [o]c(); int swap) elementwise "modulo" operation $c = $a->modulo($b,0); # explicit function call $c = $a % $b; # overloaded use $a->inplace->modulo($b,0); # modify $a inplace It can be made to work inplace with the "$a->inplace" syntax. This function is used to overload the binary "%" function. Note that when calling this function explicitly you need to supply a third argument that should generally be zero (see first example). This restriction is expected to go away in future releases. modulo does handle bad values. The state of the bad-value flag of the output piddles is unknown. spaceship Signature: (a(); b(); [o]c(); int swap) elementwise "<=>" operation $c = $a->spaceship($b,0); # explicit function call $c = $a <=> $b; # overloaded use $a->inplace->spaceship($b,0); # modify $a inplace It can be made to work inplace with the "$a->inplace" syntax. This function is used to overload the binary "<=>" function. Note that when calling this function explicitly you need to supply a third argument that should generally be zero (see first example). This restriction is expected to go away in future releases. spaceship does handle bad values. The state of the bad-value flag of the output piddles is unknown. sqrt Signature: (a(); [o]b()) elementwise square root $b = sqrt $a; $a->inplace->sqrt; # modify $a inplace It can be made to work inplace with the "$a->inplace" syntax. This function is used to overload the unary "sqrt" operator/function. sqrt does handle bad values. It will set the bad-value flag of all output piddles if the flag is set for any of the input piddles. abs Signature: (a(); [o]b()) elementwise absolute value $b = abs $a; $a->inplace->abs; # modify $a inplace It can be made to work inplace with the "$a->inplace" syntax. This function is used to overload the unary "abs" operator/function. abs does handle bad values. It will set the bad-value flag of all output piddles if the flag is set for any of the input piddles. sin Signature: (a(); [o]b()) the sin function $b = sin $a; $a->inplace->sin; # modify $a inplace It can be made to work inplace with the "$a->inplace" syntax. This function is used to overload the unary "sin" operator/function. sin does handle bad values. It will set the bad-value flag of all output piddles if the flag is set for any of the input piddles. cos Signature: (a(); [o]b()) the cos function $b = cos $a; $a->inplace->cos; # modify $a inplace It can be made to work inplace with the "$a->inplace" syntax. This function is used to overload the unary "cos" operator/function. cos does handle bad values. It will set the bad-value flag of all output piddles if the flag is set for any of the input piddles. not Signature: (a(); [o]b()) the elementwise not operation $b = ! $a; $a->inplace->not; # modify $a inplace It can be made to work inplace with the "$a->inplace" syntax. This function is used to overload the unary "!" operator/function. not does handle bad values. It will set the bad-value flag of all output piddles if the flag is set for any of the input piddles. exp Signature: (a(); [o]b()) the exponential function $b = exp $a; $a->inplace->exp; # modify $a inplace It can be made to work inplace with the "$a->inplace" syntax. This function is used to overload the unary "exp" operator/function. exp does handle bad values. It will set the bad-value flag of all output piddles if the flag is set for any of the input piddles. log Signature: (a(); [o]b()) the natural logarithm $b = log $a; $a->inplace->log; # modify $a inplace It can be made to work inplace with the "$a->inplace" syntax. This function is used to overload the unary "log" operator/function. log does handle bad values. It will set the bad-value flag of all output piddles if the flag is set for any of the input piddles. log10 Signature: (a(); [o]b()) the base 10 logarithm $b = log10 $a; $a->inplace->log10; # modify $a inplace It can be made to work inplace with the "$a->inplace" syntax. This function is used to overload the unary "log10" operator/function. log10 does handle bad values. It will set the bad-value flag of all output piddles if the flag is set for any of the input piddles. assgn Signature: (a(); [o]b()) Plain numerical assignment. This is used to implement the ".=" operator assgn does not process bad values. It will set the bad-value flag of all output piddles if the flag is set for any of the input piddles. AUTHOR
Tuomas J. Lukka (lukka@fas.harvard.edu), Karl Glazebrook (kgb@aaoepp.aao.gov.au), Doug Hunt (dhunt@ucar.edu), Christian Soeller (c.soeller@auckland.ac.nz), Doug Burke (burke@ifa.hawaii.edu), and Craig DeForest (deforest@boulder.swri.edu). perl v5.12.1 2010-07-05 Ops(3)
All times are GMT -4. The time now is 02:16 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy