且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

在Linux上将libquadmath与C ++链接

更新时间:2023-11-10 18:54:28

首先,根据Nikos C.的建议,我在另一台计算机上启动了OpenSUSE 12.2 liveCD(具有gcc 4.7.1),但出现了相同的错误.

First, according to Nikos C. advise, I boot up OpenSUSE 12.2 liveCD (which has gcc 4.7.1) on another machine, but got the same error.

然后我将此问题发布到

Then I posted this question to OpenSUSE forums.

Martin_helm的答案表明,该问题与发行版无关,并且解决方案很简单:

Martin_helm's answer shows that the problem is distro-independent and the solution is trivial:

extern "C" {
#include <quadmath.h>
}

这在我所有的机器上都可以正常工作.可以使用g++ prog.cpp -lquadmath编译程序.

This works fine on all my machines. Program can be compiled with g++ prog.cpp -lquadmath.