Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- * Executing task: C/C++: g++.exe build active file
- Starting build...
- cmd /c chcp 65001>nul && C:\msys64\ucrt64\bin\g++.exe -fdiagnostics-color=always -g F:\Data\P.Storage\Operations\Current\waiting\vscode_test\test1\test1_1.cpp -o F:\Data\P.Storage\Operations\Current\waiting\vscode_test\test1\test1_1.exe
- F:\Data\P.Storage\Operations\Current\waiting\vscode_test\test1\test1_1.cpp: In function 'LRESULT OnWindowClose(HWND, UINT, WPARAM, LPARAM)':
- F:\Data\P.Storage\Operations\Current\waiting\vscode_test\test1\test1_1.cpp:11:26: error: cannot convert 'const wchar_t*' to 'LPCSTR' {aka 'const char*'}
- 11 | if (MessageBox(window, L"Are you sure you want exit?", L"Close Form", MB_ICONQUESTION | MB_YESNO) == IDYES)
- | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- | |
- | const wchar_t*
- In file included from C:/msys64/ucrt64/include/windows.h:72,
- from F:\Data\P.Storage\Operations\Current\waiting\vscode_test\test1\test1_1.cpp:3:
- C:/msys64/ucrt64/include/winuser.h:3714:54: note: initializing argument 2 of 'int MessageBoxA(HWND, LPCSTR, LPCSTR, UINT)'
- 3714 | WINUSERAPI int WINAPI MessageBoxA(HWND hWnd,LPCSTR lpText,LPCSTR lpCaption,UINT uType);
- | ~~~~~~~^~~~~~
- F:\Data\P.Storage\Operations\Current\waiting\vscode_test\test1\test1_1.cpp: In function 'int main()':
- F:\Data\P.Storage\Operations\Current\waiting\vscode_test\test1\test1_1.cpp:28:41: error: cannot convert 'const wchar_t*' to 'LPCSTR' {aka 'const char*'}
- 28 | window = CreateWindowEx(0, WC_DIALOG, L"Form example", WS_OVERLAPPEDWINDOW, CW_USEDEFAULT, CW_USEDEFAULT, 640, 480, nullptr, nullptr, nullptr, nullptr);
- | ^~~~~~~~~~~~~~~
- | |
- | const wchar_t*
- C:/msys64/ucrt64/include/winuser.h:2203:84: note: initializing argument 3 of 'HWND__* CreateWindowExA(DWORD, LPCSTR, LPCSTR, DWORD, int, int, int, int, HWND, HMENU, HINSTANCE, LPVOID)'
- 2203 | WINUSERAPI HWND WINAPI CreateWindowExA(DWORD dwExStyle,LPCSTR lpClassName,LPCSTR lpWindowName,DWORD dwStyle,int X,int Y,int nWidth,int nHeight,HWND hWndParent,HMENU hMenu,HINSTANCE hInstance,LPVOID lpParam);
- | ~~~~~~~^~~~~~~~~~~~
- F:\Data\P.Storage\Operations\Current\waiting\vscode_test\test1\test1_1.cpp:29:41: error: cannot convert 'const wchar_t*' to 'LPCSTR' {aka 'const char*'}
- 29 | button = CreateWindowEx(0, WC_BUTTON, L"Close", WS_CHILD | WS_VISIBLE, 10, 10, 75, 25, window, nullptr, nullptr, nullptr);
- | ^~~~~~~~
- | |
- | const wchar_t*
- C:/msys64/ucrt64/include/winuser.h:2203:84: note: initializing argument 3 of 'HWND__* CreateWindowExA(DWORD, LPCSTR, LPCSTR, DWORD, int, int, int, int, HWND, HMENU, HINSTANCE, LPVOID)'
- 2203 | WINUSERAPI HWND WINAPI CreateWindowExA(DWORD dwExStyle,LPCSTR lpClassName,LPCSTR lpWindowName,DWORD dwStyle,int X,int Y,int nWidth,int nHeight,HWND hWndParent,HMENU hMenu,HINSTANCE hInstance,LPVOID lpParam);
- | ~~~~~~~^~~~~~~~~~~~
- Build finished with error(s).
- * The terminal process terminated with exit code: -1.
- * Terminal will be reused by tasks, press any key to close it.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement