简体   繁体   English

安装libx11-dev后,我无法找到Xlib.h

[英]After installing libx11-dev I am not able to find Xlib.h

There are lots of post here but none of them have helped me. 这里有很多帖子,但没有人帮我。

I have successfully installed libx11-dev from apt-get and still netbeans complaining that it cannot find include file <X11/Xlib.h> . 我已成功从apt-get安装了libx11-dev ,但仍然netbeans抱怨它无法找到包含文件<X11/Xlib.h>

Also I have tried find xlib.h and there is no Xlib.h file nor X11 folder on my hard disk. 另外我试过找xlib.h并且我的硬盘上没有Xlib.h文件也没有X11文件夹。

find / X11 
find / Xlib.h

Is there somenthing I should be looking at to fix it? 我是否应该考虑修复它? I am using ubuntu 12 and it is ac/c++ project. 我使用的是ubuntu 12,它是ac / c ++项目。

I don't know anything about netbeans, but: you can find out what's in a package installed on your system with the command 我对netbeans一无所知,但是:您可以使用该命令找出系统上安装的软件包中的内容

dpkg -L <name of package>

When I do this on an Ubuntu system I have access too, it indicates that libx11-dev is supposed to include the file /usr/include/X11/Xlib.h . 当我在Ubuntu系统上执行此操作时,我也可以访问它,它表示libx11-dev 应该包含文件/usr/include/X11/Xlib.h However, this does not tell you if the file actually exists. 但是,这并不会告诉您文件是否确实存在。 You need something like the find commands you were trying for that. 你需要像你正在尝试的find命令。

Now, your find commands didn't do anything because find has a command line syntax that's different from everything else. 现在,您的find命令没有做任何事情,因为find具有与其他所有命令行语法不同的命令行语法。 This is how to do what you were trying to do with find : 这是如何做你试图用find做的事情:

find / -name Xlib.h -print
find / -name X11 -print

(On recent systems with GNU userland (ie all Linux and some others), the trailing -print is not necessary, but on older systems and possibly also those that retain more of a BSD heritage, it is. I learned my shell back in the bad old days of SunOS 4 and I still have those habits.) (在最近使用GNU userland的系统上(即所有Linux和其他一些系统),尾随-print不是必需的,但在旧系统上,也可能是那些保留更多BSD遗产的系统,它是。我在SunOS 4过去的糟糕日子,我仍然有这些习惯。)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM