Skip to content

2 issues. first don't use uppercase header name. it should dbghelp.cpp. another is a incorrect free #2

Description

@trcrsired

~/toys $ clang++ -o win-ldd.exe win-ldd.cpp -O3 --target=aarch64-windows-msvc --sysroot=$MSVCSYSROOT -D_DLL=1 -lmsvcrt -fuse-ld=lld
win-ldd.cpp:8:10: fatal error: 'Dbghelp.h' file not found
8 | #include <Dbghelp.h>
| ^~~~~~~~~~~
1 error generated.
~/toys $ vim win-ldd.cpp
~/toys $ clang++ -o win-ldd.exe win-ldd.cpp -O3 --target=aarch64-windows-msvc --sysroot=$MSVCSYSROOT -D_DLL=1 -lmsvcrt -fuse-ld=lld
win-ldd.cpp:33:13: warning: 'delete' applied to a pointer that was allocated with 'new[]'; did you mean 'delete[]'? [-Wmismatched-new-delete]
33 | delete strDLLPath;
| ^
| []
win-ldd.cpp:30:34: note: allocated with 'new[]' here
30 | LPTSTR strDLLPath = new TCHAR[_MAX_PATH];
| ^
1 warning generated.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions