2017-07-30 286 views
-1

我尝试使用glib.h:没有这样的文件或目录

sudo apt-get install libglib2.0-dev 

sudo apt-get install libgtk2.0-dev 

但定位glib.h不返回巧舌如簧 结果中找到的任何路径安装GTK和油腔滑调glib.h是

$ locate glib.h 
/home/asus/Qt5.8.0/5.8/Src/qtbase/src/3rdparty/libjpeg/jpeglib.h 
/home/asus/Qt5.8.0/5.8/Src/qtimageformats/src/3rdparty/jasper/src/libjasper/jpg/jpg_jpeglib.h 
/home/asus/Qt5.8.0/5.8/Src/qtwebengine/src/3rdparty/chromium/base/message_loop/message_pump_glib.h 
/home/asus/Qt5.8.0/5.8/Src/qtwebengine/src/3rdparty/chromium/third_party/harfbuzz-ng/src/hb-glib.h 
/home/asus/Qt5.8.0/5.8/Src/qtwebengine/src/3rdparty/chromium/third_party/libjpeg/jpeglib.h 
/home/asus/Qt5.8.0/5.8/Src/qtwebengine/src/3rdparty/chromium/third_party/libjpeg_turbo/jpeglib.h 
/home/asus/Qt5.8.0/5.8/Src/qtwebengine/src/3rdparty/chromium/third_party/pdfium/third_party/libjpeg/jpeglib.h 
/home/asus/Qt5.8.0/5.8/Src/qtwebengine/src/3rdparty/chromium/ui/events/platform/x11/x11_event_source_glib.h 
/usr/include/reglib/reglib.h 
/usr/src/linux-headers-4.8.0-36-generic/include/config/blk/dev/bsglib.h 

使用updatedb解决了这个错误。

,但我得到更多的1错误 致命错误:glibconfig.h:没有这样的文件或目录

我想这也是巧舌如簧

我得到了答案pkg-config --cflags --libs gtk+-2.0标志相关的解决了这个

回答

-1

-I/usr/include/glib-2.0添加到您的编译器命令行(查看当然的路径)。您将需要修改你的makefile可能

+0

看起来好像问题是关于'locate'命令而不是'gcc'。 – alk

+0

有趣的downvotes。 @alk我前段时间有这个“问题”,不幸的是更新数据库(我和你一样聪明)没有帮助。也许现在它被排序。所以这个解决方法是最快的解决方案。 –

+0

运行'updatedb'只会帮助'定位',当然。它不会帮助GCC。但是,问题是关于“定位”,不是吗?顺便说一句,我删除了我的downvote。 – alk

1

but locate glib.h does not return any path for glib

您可能要更新locate的数据库(通过运行updatedb),或等到明天... ;-)

相关问题