错误C2146:语法错误:缺少';'在标识符之前

时间:2010-07-11 03:18:24

标签: c++

有问题的一行是:

  

extern BOOL logged_in;

以下是我的包含:

#define _WIN32_WINNT    0x0403              // Very important for critical sections.
#define WIN32_LEAN_AND_MEAN                 // Good to use.
#pragma optimize("gsy", on)                 // Global optimization, Short sequences, Frame pointers.
#pragma comment(linker, "/RELEASE")         // Release code
#pragma comment(linker, "/opt:nowin98")
#pragma comment(linker, "/ALIGN:4096")      // This will save you some size on the executable.
#pragma comment(linker, "/IGNORE:4108 ")    // This is only here for when you use /ALIGN:4096.
#pragma comment(linker, "/ALIGN:4096")      // This will save you some size on the executable.

//default headers
#include <windows.h>
#include <stdio.h>
#include <string.h>
#include <winsock2.h>
#include <time.h>
#include <stdlib.h>
#include <Winsvc.h>
#include <winuser.h> 
#include <tlhelp32.h>
#include <tchar.h>
#include <shlobj.h>
#include <shlwapi.h>
#include <shellapi.h>
#include <commctrl.h>

#pragma comment(lib, "ws2_32.lib") 
#pragma comment(lib, "urlmon.lib") 
#pragma comment(lib, "shlwapi.lib")
#pragma comment(lib, "shell32.lib")

有什么想法吗?

1 个答案:

答案 0 :(得分:1)

我没有在上面的代码中看到这一行,但是“缺少';'在标识符之前'表示你在该行之前缺少分号。