cancel
Showing results for 
Search instead for 
Did you mean: 

error: array type has incomplete element type

GreenGuy
Lead
Posted on March 30, 2018 at 07:29

This is occurring in fsdata_custom.c in the LwIP_HTTP_Server_Netconn_RTOS project I imported from CubeMX.  The struct that is being referenced is :

struct fsdata_file {

  const struct fsdata_file *next;

  const unsigned char *name;

  const unsigned char *data;

  int len;

  u8_t flags;

#if HTTPD_PRECALCULATED_CHECKSUM

  u16_t chksum_count;

  const struct fsdata_chksum *chksum;

#endif /* HTTPD_PRECALCULATED_CHECKSUM */

};

and the HTTPD_PRECALCULATED_CHECKSUM is defined as 0.

Where the error is occurring in fsdata_custom.c is at: (line 2336

const struct fsdata_file file__STM32F7xx_files_logo_jpg[] = { {

file_NULL,

data__STM32F7xx_files_logo_jpg,

data__STM32F7xx_files_logo_jpg + 28,

sizeof(data__STM32F7xx_files_logo_jpg) - 28,

1,

}};

According to the struct definition it looks like all the elements are there so I am confused.

Anyone run across this?

1 ACCEPTED SOLUTION

Accepted Solutions
Ben S
Associate II
Posted on June 28, 2018 at 07:00

In case anyone else comes across this - fsdata_custom.c isn't meant to be directly compiled, it gets included in httpd/fs.c.  I removed fsdata_custom.c from my Makefile and the errors went away

View solution in original post

5 REPLIES 5
Ben S
Associate II
Posted on June 27, 2018 at 20:31

hey greg - did you ever find a solution to this?  I'm having the same problem and can't seem to figure it out

Ben S
Associate II
Posted on June 28, 2018 at 07:00

In case anyone else comes across this - fsdata_custom.c isn't meant to be directly compiled, it gets included in httpd/fs.c.  I removed fsdata_custom.c from my Makefile and the errors went away

Posted on June 28, 2018 at 19:07

Ben, sorry for the late reply.  Yes you got it right.  For me I simply excluded the file from the build in the IDE.

BROBL
Associate

Hello Guys,

I'm having the same problem when trying to build the example; my problem don't go away when I exclude that file from the build, I mean is replaced by a ..\Middlewares\Third_Party\LwIP\src\apps\httpd\fs.c:41:27: fatal error: fsdata_custom.c: No such file or directory

 #[include "fsdata_custom.c"]​ 

Don't know if you would have any ideas

Jona
Associate III

I was able to get rid of the errors by including the fsdata.h file. But eventually just excluded fsdata_custom.c. I then ended up with 3 more fatal errors

multiple definition of _isatty

(2)Undefined reference to "missing_USE_FREERTOS_macro"

It must be nearly IMPOSSIBLE for St to create examples that actually build and work as I have yet to see one.

Adding "USE_FREERTOS" to the Project Properties solved one. But still have no solution for _isatty. Searching for it.. doesn't show up anywhere.