在DLL中找不到过程入口点pthread_mutex_lock

时间:2020-10-20 20:56:28

标签: c++ dll c++20

我一个小时前安装了GCC 10.2.0,从那以后我一直试图使其运行。每次我构建和运行项目时都会遇到的问题是:

The procedure entry point pthread_mutex_lock could not be located in the dynamic link library

我在Windows 8.1上使用Code :: Blocks 20.03作为我的IDE。我想我在几个月前设置GCC 9.2.0时就已经进行了完全相同的设置。简单的程序能够编译并运行而没有任何错误。尝试在向量上使用ranges::sort()时,我最终遇到上述弹出错误,并且运行时执行立即退出。我什至不明白错误。互斥锁如何进入图片?我该如何解决错误?为什么甚至在那里?

一个简单的程序,可以编译并运行,没有任何错误:

int main () {
    int n;
    std::cin >> n;
    std::vector <int> a (n);
    for (int i = 0; i < n; ++i) {
        std::cin >> a [i];
    }
//  ranges::sort(a); // once uncommented and compiled again, it fails to run

    for (int i = 0; i < n; ++i) {
        std::cout << a [i] << ' ';
    }

    return 0;
}

0 个答案:

没有答案