Expected an identifier (E40)

17 Apr 2010

I'm currently getting a compiler error.

The error message is "Expected an identifier (E40)" and is pointing to FatFileSystem line 27, col 15. With the resource of Integer.h

I'm trying to incorporate SDCard access into my small web server project. Happy to share code if anyone wants a look.

I also have SDCardTest project, this compiles fine... doesn't run... - maybe my SD card... but it does compile.

 

I don't know what to do to resolve the error. Can anyone advise?

 

- David

17 Apr 2010

Publish your project so we can see. Most likely there is a problem in a header you include before that error (e.g. a type definition not terminated with a semicolon).

19 Apr 2010 . Edited: 19 Apr 2010

Program/project published to this address:

http://mbed.org/users/dgwilson/programs/DGWWebServer


And thank you, it now compiles, I moved up the include for the SDFileSystem in front of everything else.

Now to figure out why I can't access the SD Card.

09 Aug 2010 . Edited: 10 Aug 2010

I got the same problem :)

The the header file named integer.h is here. http://mbed.org/projects/libraries/svn/FATFileSystem/trunk/integer.h

The original code designed by ChaN is here. http://elm-chan.org/fsw/ff/00index_p.html

Line 27 is...

typedef enum { FALSE = 0, TRUE } BOOL;

Maybe I think it's not so good implementation.

Because if we define FALSE or TRUE in other sources, sometime we got some errors. (Like our cases.)

so we should check library source codes we used.

09 Aug 2010 . Edited: 10 Aug 2010

I just checked the problem.

In my case, I used http://mbed.org/users/donatien/programs/EthernetNetIf

LPC1768/lwip/arch/cc.h have defines.

#ifndef TRUE
#define TRUE 1
#endif

#ifndef FALSE
#define FALSE 0
#endif

so I changed including order from

#include "EthernetNetIf.h"
#include "SDFileSystem.h"

to

#include "SDFileSystem.h"
#include "EthernetNetIf.h"

then compile is done.

In your case, Please try to change order to

#include "mbed.h"
#include "SDFileSystem.h"
#include "HTTPServer.h"
#include "HTTPRPC.h"
#include "HTTPFS.h"
#include "HTTPStaticPage.h"

or remove #include "SDFileSystem.h" in line number 11.

08 Nov 2011

This problem was exist, please fix this one.