Compilation error

December 12, 2008 at 12:10 PM | Posted in Compiler | 3 Comments

Error:
error: invalid storage class for function ‘function name’
error: expected declaration or statement at end of input
Reason: missing brace.
Solution:- Verify that all the open brace is properly closed in ‘function name’.

3 Comments »

RSS feed for comments on this post. TrackBack URI

  1. Hi, I face the same problem as the error message keep on say that:
    libvlc.c:507:11: warning: “/*” within comment
    libvlc.c:2154: error: invalid storage class for function ‘AddIntfInternal’
    libvlc.c:2214: error: invalid storage class for function ‘SetLanguage’
    libvlc.c:2281: error: invalid storage class for function ‘GetFilenames’
    libvlc.c:2331: error: invalid storage class for function ‘Help’
    libvlc.c:2363: error: invalid storage class for function ‘Usage’
    libvlc.c:2647: error: invalid storage class for function ‘ListModules’
    libvlc.c:2694: error: invalid storage class for function ‘Version’
    libvlc.c:2773: error: invalid storage class for function ‘ConsoleWidth’
    libvlc.c:2808: error: invalid storage class for function ‘VerboseCallback’
    libvlc.c:2824: error: invalid storage class for function ‘InitDeviceValues’
    libvlc.c:2910: error: expected declaration or statement at end of input

    May I know what do you mean by missing brace?
    cos I hope that can solve my problem too.
    Thanks

    • Sorry for late reply….
      missing brace means some braces are not closed properly. In the file, where you get the error, just check that all the opening braces is closed properly.
      For example:
      #include
      int test1()
      {
      int a = 2;
      if ( a == 10)
      {
      }
      will give
      test.c:7: error: expected declaration or statement at end of input

  2. thanks for your answer, I get the problem fix with your help.


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s

Blog at WordPress.com. | Theme: Pool by Borja Fernandez.
Entries and comments feeds.

Follow

Get every new post delivered to your Inbox.