[maemo-developers] Undefined reference error
From: saurabh aggarwal aggarwal.saurabh at gmail.comDate: Fri May 14 13:28:12 EEST 2010
- Previous message: Undefined reference error
- Next message: maemo-developers Digest, Vol 61, Issue 14
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
The way we do things is to actually make the pro file using QT creator and then use qmake in scratchbox/esbox to generate a makefile. We do it even for non-QT projects. Much easier to manage in my opinion. Even if you manually need to edit the pro file, it is much easier than doing it in a Makefile. You still need to configure your packages though - CONFIG+=link_pkgconfig PKGCONFIG+=libhal libhal-storage -Saurabh On Fri, May 14, 2010 at 3:19 PM, Dave Neary <dneary at maemo.org> wrote: > Hi, > > David King wrote: > > On 2010-05-14 11:13, David King <davidk at openismus.com> wrote: > >> Yes, if you are using libhal and libhal-storage through pkg-config with > >> autotools, then I guess that you have: > >> > >> PKG_CHECK_MODULES([HAL], [libhal libhal-storage]) > >> > >> or similar in your configure.ac. If not, then you should add it. > > > > Sorry, the line above should be: > > > > PKG_CHECK_MODULES([HAL], [hal hal-storage]) > > Ah, the joys of package names vs pkgconfig modules... > > The other way to do it with "normal" Makefileness is to get the CFLAGS > for HAL and HAL Storage with: > > pkg-config --cflags hal > pkg-config --cflags hal-storage > > > and the LDFLAGS with > > pkg-config --libs hal > pkg-config --libs hal-storage > > In practice, in the Makefile, it'd probably look like this: > > CFLAGS = $(shell pkg-config --cflags hal hal-storage) > LDFLAGS = $(shell pkg-config --libs hal hal-storage) > OBJECTS = main.o > > myprog: $(OBJECTS) > cc $(CFLAGS) -o $(output) $(inputs) $(LDFLAGS) > > %.o: %.c > cc $(CFLAGS) -c $(input) -o $(output) > > Cheers, > Dave. > > -- > maemo.org docsmaster > Email: dneary at maemo.org > Jabber: bolsh at jabber.org > > _______________________________________________ > maemo-developers mailing list > maemo-developers at maemo.org > https://lists.maemo.org/mailman/listinfo/maemo-developers > -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.maemo.org/pipermail/maemo-developers/attachments/20100514/b4bc0a46/attachment.htm>
- Previous message: Undefined reference error
- Next message: maemo-developers Digest, Vol 61, Issue 14
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]