Expected unqualified ID before string constant

The answer is: My code is missing a “;”
= = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
site:

back to the error of the line, found no problem.

error file: ptlogin2_api.h (line 22) : With the unqualified id before string constant

, in the middle of my CPP code (definitely not in the header file), a function XXX from the file ptlogin2_api.h,

#ifdef cplusplus
extern “C” {====== > Which line
#endif

turns out to be wrong?

I’m contains ptlogin2_api. H a recent include file
# include “dev_db_def. H” = = = = = = = = = = = = = = = = = = = “inside out of the question! Enumeration value definition ends with “; “missing. . Ptlogin_app_id.
# include “h”
# include “panel_auth. H”

= = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
there are multiple solutions can be found that the problem
1) add new code removed entirely, including the header files, to ensure that your code can be compiled through.
2) since there is no problem with the error, there is a problem near the code, or there is a problem with another file nearby. It is often the case that a file ends up missing the “;” , error in another file.
3) vi dev_insert.o is a versatile way to expand the code and see the state of the file when the compiler finally compiles the code. But it’s also the most complicated.

my dev_insert.o expand as follows:

45053 # 42 “.. H “
45054 enum _errorcode55 {
45056 DR_ERR_OK = 0,
45057 dr_err_validity = 1000,
45058 DR_ERR_LOGIN_STATE,
45059 DR_ERR_INSERT_DEV,
45060 DR_ERR_SELECT_DEV,
45061 DR_ERR_UPDATE_DEV,
45062 DR_ERR_ACTION_TYPE,
45063
45064}
45065 # 15 “dev_insert.cpp” 2
45066 # 1 “/data/home/nemo/code/isd_qzoneappbase_proj/base_class/base_lib/include/ptlogin_app_id.h” 1
45067 # 16 “dev_insert.cpp” 2
45068 # 1 “/data/home/ code/isd_qzoneappbase_proj/outerlib/panel_auth/include/panel_auth. H “1
45069
45070
45071
45072 # 1
45072 # 1 “/data/home/ code/isd_qzoneappbase_proj/base_class/extern_libs/tdev/include/toiw_all.h” 1
45073 # 5 “/data/home/ code/isd_qzoneappbase_proj/outerlib/panel_auth/include/panel_auth. H” 2
45074 # 1 “/data/home/nemo/code/isd_qzoneappbase_proj/base_class/extern_libs/tbase/include/tbase_all.h” 1
45075 # 6 “/data/home/ code/isd_qzoneappbase_proj/outerlib/panel_auth/include/panel_auth. H “2
45076 # 1 “/data/home/ code/isd_qzoneappbase_proj/outerlib/panel_auth/include/ptlogin2_api.h” 1
45077 # 25 “/ data/home/nemo/code/isd_qzoneappbase_proj/outerlib/panel_auth/include/ptlogin2_api. H”
45078 extern “C” {45079

= = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
For detailed debugging procedures, you can refer to a document in the mailbox and search for the keyword debugging using GCC.

= = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
the GCC common error of the error, less often because;

expected unqualified-id before ****
generally occurs with the following prompt information as well as the unqualified ‘; ‘, and look up from the error to see if there is a semicolon missing at the end of the header file and at the end of the enumeration definition included above.

error: multiple types in one declaration
>
error: multiple types in one declaration
> In the second class, the last error.

= = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
type redefine link failure, if can’t find the cause of the code, may be written makefile have problems
the same. The two o file link, in this mistake. Depressed.
Make your own makefiles under GCC. Be very careful.

Read More: