I'm writing my first C++ program on Windows 11. The code only includes , prints two lines, and returns 0, so it seems valid. However, every time I compile it, I get this linker error:
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/16.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/16.2.0/liblto_plugin.dll: error loading plugin
collect2.exe: error: ld returned 1 exit status
I installed the compiler by following a tutorial, but I'm not sure whether it was configured correctly or how the compiler and linker are being invoked. What should I check to resolve this?
1 Answer
This turned out to be a Windows security setting rather than a problem with the program. Disabling Smart App Control under Windows Security > App & browser control allowed the linker plugin to load and fixed the build.

Related Questions
How To: Running Codex CLI on Windows with Azure OpenAI
Set Wordpress Featured Image Using Javascript
How To Fix PHP Random Being The Same
Why no WebP Support with Wordpress
Replace Wordpress Cron With Linux Cron
Customize Yoast Canonical URL Programmatically