Skip to content

使用Buildroot内置交叉编译器编译seetaface2报错:错误:‘fegetround’在此作用域中尚未声明 #133

@Lonelyser

Description

@Lonelyser

[检查头文件没问题,应该是没有使用C++11以上编译?
查看报错位置是在SeetaNet\src\orz\tools\box.cpp中,查看一下是这个函数的问题:
static int safe_ceil(double x) { int result; int save_round = std::fegetround(); std::fesetround(FE_UPWARD); result = int(std::lrint(x)); std::fesetround(save_round); return result; }
了解一下是对浮点值向上取整吧,而且只使用了2处位置,所以我把她改成了std::ceil()函数,
这样我的交叉编译器编译通过了XD

Uploading patchfile.patch…

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions