打开APP
userphoto
未登录

开通VIP,畅享免费电子书等14项超值服

开通VIP
maemo.org

How to include glib-object.h

Christoph Eckert

2010-03-28 22:14 UTC
Hi,

I try to port a Maemo 4.1 pygtk application to Qt4 on Maemo 5. The application
is running, but now it requires location data. Since the location API has
changed in Maemo 5, I try to understand the example given at
http://bit.ly/a3HTFD

As soon as I put
#include <location/location-gps-device.h>
#include <location/location-gpsd-control.h>
in one of my files, the compiler complains:
http://pastebin.com/c45NU0FB

glib-object.h: No such file or directory

This file includes further files, as listed here:
http://bit.ly/dprcX6

I'm obviously missing some include path or similar. Appearently I'm a bloody
hobbyist, so please bear with me :) . Any hint, even RTFM is much appreciated.

Best regards,

ce

  •  Reply

Re: How to include glib-object.h

Karma: 11
2010-03-29 09:18 UTC
On Mon, Mar 29, 2010 at 3:44 AM, Christoph Eckert <ce@christeck.de> wrote:
>
> glib-object.h: No such file or directory
>
> This file includes further files, as listed here:
> http://bit.ly/dprcX6
>
> I'm obviously missing some include path or similar. Appearently I'm a bloody
> hobbyist, so please bear with me :) . Any hint, even RTFM is much appreciated.

Try adding -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include to your
gcc invocation.

martin
  •  Reply

Re: How to include glib-object.h

Karma: 693
2010-03-29 09:24 UTC
On Mon, Mar 29, 2010 at 02:48:18PM +0530, Martin DeMello wrote:

> > glib-object.h: No such file or directory
>
> Try adding -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include to
> your gcc invocation.

Actually you should include `pkg-config --cflags glib-2.0`

Berto
  •  Reply

RE: How to include glib-object.h

<kate.alhola at nokia.com>

2010-03-29 09:39 UTC
>________________________________________
>From: maemo-developers-bounces@maemo.org [maemo-developers-bounces@maemo.org] On Behalf Of ext Christoph Eckert [ce@christeck.de]
>Sent: Monday, March 29, 2010 1:14 AM
>To: maemo-developers@maemo.org
>Subject: How to include glib-object.h
>
>Hi,
>
>I try to port a Maemo 4.1 pygtk application to Qt4 on Maemo 5. The application
>is running, but now it requires location data. Since the location API has
>changed in Maemo 5, I try to understand the example given at
>http://bit.ly/a3HTFD

May be better solution is to use directly qt-mobility libqtm-location .
Qt mobility will be foture proof cross platfrom solution. For marmatan
native location API will anyhow change. For fremantle libqtmlocation
is wrapper over liblocation0 . For Harmatan its is direct connection to dbus
but API remains same.


Kate

>As soon as I put
>#include <location/location-gps-device.h>
>#include <location/location-gpsd-control.h>
>in one of my files, the compiler complains:
>http://pastebin.com/c45NU0FB
>
>glib-object.h: No such file or directory
>
>This file includes further files, as listed here:
>http://bit.ly/dprcX6

I'm obviously missing some include path or similar. Appearently I'm a bloody
hobbyist, so please bear with me :) . Any hint, even RTFM is much appreciated.

Best regards,

ce

  •  Reply

Re: How to include glib-object.h

Karma: 604
2010-03-29 13:25 UTC
On Mon, 2010-03-29 at 11:24 +0200, Alberto Garcia wrote:
> Actually you should include `pkg-config --cflags glib-2.0`

Well, actually, the location library apparently provides a pkg-config
file that he should check for instead, so he doesn't have to worry about
checking for its glib dependency.

However, this example suggests that the liblocation pkg-config file is
broken, because it suggests checking for glib too. Well, that whole
pkg-config call is very strange.
http://wiki.maemo.org/Documentation/Maemo_5_Developer_Guide/Using_Connectivity_Components/Using_Location_API#Using_Location_API

CCing David so he can investigate.

--
murrayc@murrayc.com
www.murrayc.com
www.openismus.com

  •  Reply

Re: How to include glib-object.h

Karma: 586
2010-03-29 15:42 UTC
On 2010-03-29 15:25, Murray Cumming <murrayc@murrayc.com> wrote:
>On Mon, 2010-03-29 at 11:24 +0200, Alberto Garcia wrote:
>> Actually you should include `pkg-config --cflags glib-2.0`
>
>Well, actually, the location library apparently provides a pkg-config
>file that he should check for instead, so he doesn't have to worry about
>checking for its glib dependency.
>
>However, this example suggests that the liblocation pkg-config file is
>broken, because it suggests checking for glib too. Well, that whole
>pkg-config call is very strange.
>http://wiki.maemo.org/Documentation/Maemo_5_Developer_Guide/Using_Connectivity_Components/Using_Location_API#Using_Location_API
>
>CCing David so he can investigate.

I fixed the pkg-config invocation to be less misleading:

pkg-config --cflags --libs liblocation

and as the liblocation pkg-config file correctly depends on glib-2.0,
that is included automatically in the compiler and linker flags.

--
David King | http://amigadave.com/ | davidk@openismus.com
  •  Reply

Re: How to include glib-object.h

Christoph Eckert

2010-03-30 09:54 UTC
Hi,

thanks a bunch for the helpful info. Will try either of them as soon I solved
another problem :) .

Best regards,

ce
  •  Reply

Re: How to include glib-object.h

Christoph Eckert

2010-03-31 10:43 UTC
Hi,

> > > glib-object.h: No such file or directory
> >
> > Try adding -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include to
> > your gcc invocation.
>
> Actually you should include `pkg-config --cflags glib-2.0`

I just added
CONFIG += link_pkgconfig
PKGCONFIG += libnotify
to the .pro file as suggested here:
http://bit.ly/6nsy79

This does the trick, though I obviously have not understood the issue
completely :) .

Thanks for the help,
本站仅提供存储服务,所有内容均由用户发布,如发现有害或侵权内容,请点击举报
打开APP,阅读全文并永久保存 查看更多类似文章
猜你喜欢
类似文章
【热】打开小程序,算一算2024你的财运
装载 ubuntu下git卸载 || 缺少alsa/asoundlib.h问题 || .
怎样编译和配置GStreamer?
linux里命令pkg-config工具的使用  - linux - LINUX系统维护与...
在 Linux 系统上源码安装 GTK+ 2.0(转)
为什么我的Linux上装Firefox3不成功
c Ubuntu系统下GTK安装
更多类似文章 >>
生活服务
热点新闻
分享 收藏 导长图 关注 下载文章
绑定账号成功
后续可登录账号畅享VIP特权!
如果VIP功能使用有故障,
可点击这里联系客服!

联系客服