Compiler error: error C2146: Syntax error: Missing ‘; ‘ before identifier ‘fd’
Follow up my_socket FD in mySQL_com.h file; /* For Perl DBI/ DBD */ line, found that the compiler does not recognize my_socket, but my_socket is defined in mysql.h: #define my_socket SOCKET, so the next is the SOCKET definition. SOCKET definition is in Winsock2.h, but with the predefined # IFDEF ___, the header winsock2.h is not included at all.
Solution: In #include< mysql.h> With # include< winsock2.h> Can!
Follow up my_socket FD in mySQL_com.h file; /* For Perl DBI/ DBD */ line, found that the compiler does not recognize my_socket, but my_socket is defined in mysql.h: #define my_socket SOCKET, so the next is the SOCKET definition. SOCKET definition is in Winsock2.h, but with the predefined # IFDEF ___, the header winsock2.h is not included at all.
Solution: In #include< mysql.h> With # include< winsock2.h> Can!
Read More:
- winnt.h C2146 error C2146: syntax error : missing ‘;’ before identifier ‘PVOID64’
- Error c2061: syntax error: identifier ‘this_ FILE’
- Solutions to error c2143: syntax error: missing ‘;’ before ‘type’ in C + + program compilation
- error C2061: syntax error : identifier ‘BinryTreeNode’
- VS2010 library function problem: objidl. H (11266): error c2061: syntax error: identifier ‘__ RPC__ out_ xcount_ part’
- C error C2143 syntax error missing before ‘type’
- Error c2143: syntax error: missing ‘;’ before ‘type’
- Error c3861: identifier not found | identifier not found
- Successfully resolved error c3861: ‘printf’: identifier not found
- syntax error on token “catch”,Identifier expected
- Error c3861: “strcasecmp”: identifier not found
- Error C2065 ‘cout’: undeclared identifier
- Syntax error: invalid character in identifier
- Error c2065: ‘new’: undeclared identifier, mainly because it is a. C file
- error C2065: ‘cout’ : undeclared identifier
- error C2065: “_ LPW “: undeclared identifier
- error C2065: ‘_beginthread‘ : undeclared identifier
- “Unexpected syntax error: unexpected identifier”.
- [development experience] solution to unexpected syntax error: unexpected identifier in JSON parsing
- Xcode Error: Embedded binary’s bundle identifier is not prefixed with the parent app’s bundle identifier