编译出现的问题,是什么原因!
一下是程序里面的一段代码
int PASCAL WinMain (HANDLE hInstance, HANDLE hPrevInstance,
LPSTR lpszCmdLine, int nCmdShow)
{
MSG msg;
WNDCLASS wndclass;
if ( ! hPrevInstance ){
wndclass.style = CS_HREDRAW | CS_VREDRAW;
wndclass.lpfnWndProc = MainWndProc;
wndclass.cbClsExtra = 0;
wndclass.cbWndExtra = 0;
wndclass.hInstance = hInstance;
wndclass.hIcon = LoadIcon (NULL, IDI_APPLICATION);
wndclass.hCursor = LoadCursor (NULL, IDC_ARROW);
wndclass.hbrBackground = GetStockObject (WHITE_BRUSH);
wndclass.lpszMenuName = "BMPMENU";
wndclass.lpszClassName = "phoenix ip system";
}
if ( ! RegisterClass (&wndclass) )
return FALSE;
hWnd = CreateWindow ("phoenix ip system","Open and display a bitmap",
WS_OVERLAPPEDWINDOW,CW_USEDEFAULT,CW_USEDEFAULT,
CW_USEDEFAULT, CW_USEDEFAULT, NULL,NULL,
hInstance, NULL);
if (!hWnd)
return FALSE;
ShowWindow (hWnd, SW_SHOWMAXIMIZED);
UpdateWindow (hWnd);
while ( GetMessage (&msg, NULL, 0, 0) ){
TranslateMessage (&msg);
DispatchMessage (&msg);
}
return msg.wParam;
}
在用Dev-C++编译的时候,提示
error: invalid conversion from `void*' to `HINSTANCE__*'
error: invalid conversion from `void*' to `HBRUSH__*'
error: invalid conversion from `void*' to `HINSTANCE__*'
error: initializing argument 11 of `HWND__* CreateWindowExA(DWORD, const CHAR*, const CHAR*, DWORD, int, int, int, int, HWND__*, HMENU__*, HINSTANCE__*, void*)'
int PASCAL WinMain (HANDLE hInstance, HANDLE hPrevInstance,
LPSTR lpszCmdLine, int nCmdShow)
{
MSG msg;
WNDCLASS wndclass;
if ( ! hPrevInstance ){
wndclass.style = CS_HREDRAW | CS_VREDRAW;
wndclass.lpfnWndProc = MainWndProc;
wndclass.cbClsExtra = 0;
wndclass.cbWndExtra = 0;
wndclass.hInstance = hInstance;
wndclass.hIcon = LoadIcon (NULL, IDI_APPLICATION);
wndclass.hCursor = LoadCursor (NULL, IDC_ARROW);
wndclass.hbrBackground = GetStockObject (WHITE_BRUSH);
wndclass.lpszMenuName = "BMPMENU";
wndclass.lpszClassName = "phoenix ip system";
}
if ( ! RegisterClass (&wndclass) )
return FALSE;
hWnd = CreateWindow ("phoenix ip system","Open and display a bitmap",
WS_OVERLAPPEDWINDOW,CW_USEDEFAULT,CW_USEDEFAULT,
CW_USEDEFAULT, CW_USEDEFAULT, NULL,NULL,
hInstance, NULL);
if (!hWnd)
return FALSE;
ShowWindow (hWnd, SW_SHOWMAXIMIZED);
UpdateWindow (hWnd);
while ( GetMessage (&msg, NULL, 0, 0) ){
TranslateMessage (&msg);
DispatchMessage (&msg);
}
return msg.wParam;
}
在用Dev-C++编译的时候,提示
error: invalid conversion from `void*' to `HINSTANCE__*'
error: invalid conversion from `void*' to `HBRUSH__*'
error: invalid conversion from `void*' to `HINSTANCE__*'
error: initializing argument 11 of `HWND__* CreateWindowExA(DWORD, const CHAR*, const CHAR*, DWORD, int, int, int, int, HWND__*, HMENU__*, HINSTANCE__*, void*)'
...全文
相关推荐
npm install出现gyp ERR! configure error问题
npm install过程中的gyp ERR! configure error问题通常与Node.js的原生扩展模块有关,这类模块通常需要通过node-gyp工具进行编译。错误信息gyp ERR!
用Vue-cli搭建的项目中引入css报错的原因分析
报错原因报错的原因主要是因为Vue-cli在编译css文件时,需要在webpack.base.conf.js文件中配置对应的loader。
ASP.NET反编译工具--祝你一臂之力!
这种工具对于开发者来说尤其有用,因为它们可以用来查看和学习其他人的代码,或者在没有原始源代码的情况下调试或修复问题。描述中的"祝你一臂之力!
iccavr软件编译时错误提示
ED:\\ʵ̳\LEDӦ\\main.c(53):syntaxerror;found`}'expecting`;'```**原因分析**: 此类错误通常是由于源代码中的语法问题造成的。
C语言编程常见问题,自己总结的,希望对大家有用
并详细分析了编译和链接错误的原因和解决方法,特别是 LN2001 错误的解决方法。


新手乐园
