X.org X 输入驱动程序问题:链接 xf86AddInputDriver 函数

发布于 2024-11-24 11:53:16 字数 600 浏览 10 评论 0原文

我正在尝试在 RedHat 6 Linux 上使用 Xf86 API(X 输入驱动程序)编写鼠标驱动程序。当我尝试链接以下代码时,出现错误:

undefined reference to `xf86AddInputDriver`

我不知道哪个库提供该函数。你们有人知道吗?有我需要的图书馆吗?我不确定我是否拥有所有库或者是否必须构建它们。如果我必须构建它们,我该如何从 x.org 源代码构建它们?

static pointer XMouseDriver_plugin (pointer module,
                                    pointer aOptions,
                                    int * aErrMajPtr,
                                    int  * aErrMinPtr)
{
    xf86AddInputDriver(&fgInputDriverInitData,
               module,
               0);

    return (module);
}

I am trying to write a mouse driver, on RedHat 6 linux, using the Xf86 API (X Input Driver). When I try to link the following code, I get an error stating:

undefined reference to `xf86AddInputDriver`

I don't know which library provides the function. Do any of you know? Is there a library that I need? I'm not sure if I have all the libraries or whether I have to build them. If I have to build them, what do I build them from the x.org source code?

static pointer XMouseDriver_plugin (pointer module,
                                    pointer aOptions,
                                    int * aErrMajPtr,
                                    int  * aErrMinPtr)
{
    xf86AddInputDriver(&fgInputDriverInitData,
               module,
               0);

    return (module);
}

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

一笑百媚生 2024-12-01 11:53:16

Xorg 输入驱动程序是由 Xorg 服务器加载的动态库。 xf86AddInputDriver 函数在 Xorg 服务器内部定义。获取 Xorg 源代码并检查 hw/xfree86/common/xf86Helper.c:

http://cgit.freedesktop.org/xorg/xserver/tree/hw/xfree86/common/xf86Helper.c#n112

如果您想学习如何编写 X 服务器驱动程序,有一个名为 DESIGN 的文档:

http://cgit.freedesktop.org/xorg/xserver/tree/hw/xfree86/doc/ddxDesign.xml

A Xorg input driver is a dynamic library that gets loaded by the Xorg server. The xf86AddInputDriver function is defined inside the Xorg server. Get the Xorg source code and check hw/xfree86/common/xf86Helper.c:

http://cgit.freedesktop.org/xorg/xserver/tree/hw/xfree86/common/xf86Helper.c#n112

If you want to learn how to write an X server driver, there's a document called DESIGN:

http://cgit.freedesktop.org/xorg/xserver/tree/hw/xfree86/doc/ddxDesign.xml

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文