Error expected after top level declarator swift 3 in pod năm 2024

Your line numbers don't match up to your actual code. Most likely you forgot to

include something because it's complaining about an incomplete type. If it isn't too long, can you post the beginning of the file up to the function, and where you call it from?

Otherwise, make a copy of your code and delete any extraneous code that doesn't contribute towards the error.

Last edited on

If I had to guess, the problem is before this code.

So, before this code there was a struct. If I typed "typedef" before struct it works, otherwise it didn't. why that?

We cannot comment on what we cannot see.

I expect you left out a semi-colon. I am having to use psychic powers for this, though; you're bad at C++, but you're truly awful at asking questions.

Hi all, I need help and bug finding for solution for the issue I have got when trying to install ImageMagick. This comes when I enter 'make' command after the previous step for installation which is './configure'.

Code:

'png.c:148:24: error: expected ';' after top level declarator'
and
fatal error: too many errors emitted, stopping now

Code:

png.c:145:24: error: expected ';' after top level declarator
static png_byte FARDATA mng_MHDR[5]={ 77,  72,  68,  82, '\0'};
                       ^
                       ;
png.c:146:24: error: expected ';' after top level declarator
static png_byte FARDATA mng_BACK[5]={ 66,  65,  67,  75, '\0'};
                       ^
                       ;
png.c:147:24: error: expected ';' after top level declarator
static png_byte FARDATA mng_BASI[5]={ 66,  65,  83,  73, '\0'};
                       ^
                       ;
png.c:148:24: error: expected ';' after top level declarator
static png_byte FARDATA mng_CLIP[5]={ 67,  76,  73,  80, '\0'};
                       ^
                       ;
png.c:149:24: error: expected ';' after top level declarator
static png_byte FARDATA mng_CLON[5]={ 67,  76,  79,  78, '\0'};
                       ^
                       ;
png.c:150:24: error: expected ';' after top level declarator
static png_byte FARDATA mng_DEFI[5]={ 68,  69,  70,  73, '\0'};
                       ^
                       ;
png.c:151:24: error: expected ';' after top level declarator
static png_byte FARDATA mng_DHDR[5]={ 68,  72,  68,  82, '\0'};
                       ^
                       ;
png.c:152:24: error: expected ';' after top level declarator
static png_byte FARDATA mng_DISC[5]={ 68,  73,  83,  67, '\0'};
                       ^
                       ;
png.c:153:24: error: expected ';' after top level declarator
static png_byte FARDATA mng_ENDL[5]={ 69,  78,  68,  76, '\0'};
                       ^
                       ;
png.c:154:24: error: expected ';' after top level declarator
static png_byte FARDATA mng_FRAM[5]={ 70,  82,  65,  77, '\0'};
                       ^
                       ;
png.c:155:24: error: expected ';' after top level declarator
static png_byte FARDATA mng_IEND[5]={ 73,  69,  78,  68, '\0'};
                       ^
                       ;
png.c:156:24: error: expected ';' after top level declarator
static png_byte FARDATA mng_IHDR[5]={ 73,  72,  68,  82, '\0'};
                       ^
                       ;
png.c:157:24: error: expected ';' after top level declarator
static png_byte FARDATA mng_JHDR[5]={ 74,  72,  68,  82, '\0'};
                       ^
                       ;
png.c:158:24: error: expected ';' after top level declarator
static png_byte FARDATA mng_LOOP[5]={ 76,  79,  79,  80, '\0'};
                       ^
                       ;
png.c:159:24: error: expected ';' after top level declarator
static png_byte FARDATA mng_MAGN[5]={ 77,  65,  71,  78, '\0'};
                       ^
                       ;
png.c:160:24: error: expected ';' after top level declarator
static png_byte FARDATA mng_MEND[5]={ 77,  69,  78,  68, '\0'};
                       ^
                       ;
png.c:161:24: error: expected ';' after top level declarator
static png_byte FARDATA mng_MOVE[5]={ 77,  79,  86,  69, '\0'};
                       ^
                       ;
png.c:162:24: error: expected ';' after top level declarator
static png_byte FARDATA mng_PAST[5]={ 80,  65,  83,  84, '\0'};
                       ^
                       ;
png.c:163:24: error: expected ';' after top level declarator
static png_byte FARDATA mng_PLTE[5]={ 80,  76,  84,  69, '\0'};

Code:

PHP version: 5.6.30
OS: mac, Sierra
ImageMagick downloaded: Have tried, most of listed in 'https://sourceforge.net/projects/imagemagick/files/' 

Please let me know any further details I need to provide for my query. Thanks a lot.

What is a top level declarator?

Top-level declarations consist of only declarations, and are allowed in all Swift source files. Executable top-level code contains statements and expressions, not just declarations, and is allowed only as the top-level entry point for the program.