Open trcrsired opened 2 months ago
~/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 | ^~~ 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.
small issues like use std::endl should be avoided too
BTW. the performance is very slow due to std::endl i guess
i have submitted pr to fix issues
~/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
| ^
~~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.