# C Question compilation error

**URL:** <https://community.unix.com/t/c-question-compilation-error/196640>\
**Category:** Programming\
**Created:** [May 12, 2008, 9:40am UTC](https://community.unix.com/t/c-question-compilation-error/196640 "2008-05-12T09:40:40Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![jaganreddy](https://community.unix.com/letter_avatar/jaganreddy/32/6_22734026db12803ebb3e059622ac3534.png) [@jaganreddy](https://community.unix.com/u/jaganreddy)\
**Post date:** [May 12, 2008, 9:40am UTC](https://community.unix.com/t/c-question-compilation-error/196640/1 "2008-05-12T09:40:40Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![era](https://community.unix.com/letter_avatar/era/32/6_22734026db12803ebb3e059622ac3534.png) [@era](https://community.unix.com/u/era)\
**Post date:** [May 12, 2008, 10:05am UTC](https://community.unix.com/t/c-question-compilation-error/196640/2 "2008-05-12T10:05:09Z")

</div>

It means your source file is not valid C.

We could suspect that there is a header file which you could include which would define state\_field as a valid variable type (you can define your own types in C) but without more information, this is pure speculation. Most likely a local person (perhaps whoever gave you the assignment to compile this file) would know much better than us here inside of your computer.
