海思3536SDK出现“pure virtual method called”的解决方法

代码如下:

#include <string>
#include <iostream>
#include <thread>
using namespace std;

void test(){
        cout << "thread .........." << endl;
}

int main(){
        std::thread t=std::thread(&test);
        t.join();
        cout << "**********" << endl;
        return 1;
}

有问题的编译及输出:

arm-hisiv400-linux-gnueabi-g++ ex1.cpp -o ex1  -std=c++11 -pthread

./ex1
pure virtual method called
terminate called without an active exception
Aborted

正确的编译及输出

arm-hisiv400-linux-gnueabi-g++ ex1.cpp -o ex1  -std=c++11 -pthread -mcpu=cortex-a7

~/gb # ./ex1
thread ..........
**********

猜你喜欢

转载自blog.csdn.net/caishi8860/article/details/83781009