简体   繁体   中英

CodeBlocks with MinGW: dll missing on runtime

Even when running some "Hello World" programs, I get missing dll error on runtime. Copying .dll to .exe folder obviously works but it's a dumb solution for std::cout << "abc"; .

These are my compiler setting. After adding linking options (bottom right corner) the error just went from one dll to another (libwinpthread-1.dll).

在此处输入图片说明

我通过在链接命令中添加-static -lpthread来解决此问题。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM