79339101

Date: 2025-01-08 12:20:27
Score: 1
Natty:
Report link

If you want to use MessageBoxA you need to open c_cpp_properties.json / tasks.json file and add link to the User32.lib.

Here is the sample code:

{
"tasks": [
    {
        "type": "cppbuild",
        "label": "C/C++: cl.exe build active file",
        "command": "cl.exe",
        "args": [
            "/Zi",
            "/EHsc",
            "/nologo",
            "/Fe${fileDirname}\\${fileBasenameNoExtension}.exe",
            "${file}",
            "/link",
            "User32.lib"
        ],
        "options": {
            "cwd": "${fileDirname}"
        },
        "problemMatcher": [
            "$msCompile"
        ],
        "group": {
            "kind": "build",
            "isDefault": true
        },
        "detail": "Task generated by Debugger."
    }
],
"version": "2.0.0"
}
Reasons:
  • Long answer (-0.5):
  • Has code block (-0.5):
  • User mentioned (1): User32
  • Low reputation (1):
Posted by: Yevhenii Yesypko