error C2059: syntax error: "const" solution

Scenes


     Add Kang, Yu visual docking SDK header files and libraries, the compiler error message error C2059: syntax error: "constant." Yu visual display SDK headers NetDEVSDK.h macro definitions in abnormal
 typedef enum tagNETDEV_PASSIVEDECODE_CMD
 {
  PASSIVE_DEC_PAUSE =. 1, / * passive decoding pause (only valid file stream) * /
  PASSIVE_DEC_RESUME = 2, / * restore passive decoding (only valid stream file) * /
  PASSIVE_DEC_FAST =. 3, / * fast passive decoding (only valid file stream) * /
  PASSIVE_DEC_SLOW. 4 =, / * slow passive decoding (valid only stream file) * /
  PASSIVE_DEC_NORMAL =. 5, / * normal passive decoding (only valid file stream ) * /
  PASSIVE_DEC_ONEBYONE =. 6, / * decode passive single-frame play (reserved) * /
  PASSIVE_DEC_AUDIO_ON =. 7, / * open audio * /
  PASSIVE_DEC_AUDIO_OFF =. 8, / * Close audio * /
  PASSIVE_DEC_RESETBUFFER. 9 = / * empty the buffer * /
 } NETDEV_PASSIVEDECODE_CMD_E;

NetDEVSDK.h (5082): error C2059: Syntax Error: "constant"
NetDEVSDK.h (5091): error C2143: syntax error: missing ";" (in front of the "}") is

Mouse over PASSIVE_DEC_PAUSE, see the error message: #define PASSIVE_DEC_PAUSE 1



The investigation process
             carried out search PASSIVE_DEC_PAUSE macro definition to the entire project directory in Notepad ++, has been found in the header file is defined HCNetSDK.h Kang's
#define PASSIVE_DEC_PAUSE 1 / * Passive decoding pause (only valid document flow) * /
#define PASSIVE_DEC_RESUME 2 / * recovery passive decoding (only valid file stream) * /
#define PASSIVE_DEC_FAST. 3 / * rapid passive decoding (only valid file stream) * /
#define PASSIVE_DEC_SLOW. 4 / * slow passive decoding (only valid file stream) * /
#define PASSIVE_DEC_NORMAL 5 / * normal passive decoding (only valid file stream) * /
#define PASSIVE_DEC_ONEBYONE. 6 / single-frame play * passive decoding (reserved) * /
#define PASSIVE_DEC_AUDIO_ON. 7 / * audio On * /
#define PASSIVE_DEC_AUDIO_OFF. 8 / * Close * audio /
#define PASSIVE_DEC_RESETBUFFER 9 / * empty the buffer * /
thus giving rise to the above tips error


solution

            In Yu depending SDK header file not searched NETDEV_PASSIVEDECODE_CMD_E macro definitions to use, therefore, direct comment out the entire macro definitions to solve the problem


Guess you like

Origin blog.51cto.com/fengyuzaitu/2426171