Mailinglist Archive: opensuse (1597 mails)

< Previous Next >
Re: [opensuse] where to place the library glib
  • From: Maura Monville <mauede@xxxxxxxxx>
  • Date: Fri, 30 Oct 2009 06:04:42 -0700 (PDT)
  • Message-id: <73604.39666.qm@xxxxxxxxxxxxxxxxxxxxxxxxxxx>
--- Ven 30/10/09, David Haller <dnh@xxxxxxxxxxxx> ha scritto:

Da: David Haller <dnh@xxxxxxxxxxxx>
Oggetto: Re: [opensuse] where to place the library glib
A: "SuSE Help" <opensuse@xxxxxxxxxxxx>
Data: Venerdì 30 ottobre 2009, 01:33
Hello,

On Thu, 29 Oct 2009, Maura Monville wrote:
mauede@bordighera:~/miRTA-Dir/Parini-Dir/galopps/galopps3.2.4.Parini/miRTA_MEM>
gcc miRTA_MEM-main.c -o miRTA_MEM

In file included from miRTA_MEM-main.c:9:
/usr/local/include/g_arraylist.h:1:18: error: glib.h:
No such file or directory

You need to tell gcc where to look for headers -- and only
use the
standard form of includes in your code. And also how to
link with glib.

====
#include <glib.h>
====

$ gcc $(pkg-config --cflags --libs glib-2.0)
miRTA_MEM-main.c -o miRTA_MEM

HTH,
-dnh


My short program contains #include <glib.h> as the first statement.
The glib is installed as shown in the following:

mauede@bordighera:~/miRTA-Dir/Parini-Dir/galopps/galopps3.2.4.Parini/miRTA_MEM>
rpm -ql glib
/usr/lib/libglib-1.2.so.0

/usr/lib/libglib-1.2.so.0.0.10

/usr/lib/libgmodule-1.2.so.0

/usr/lib/libgmodule-1.2.so.0.0.10

/usr/lib/libgthread-1.2.so.0

/usr/lib/libgthread-1.2.so.0.0.10

/usr/share/doc/packages/glib

/usr/share/doc/packages/glib/AUTHORS

/usr/share/doc/packages/glib/COPYING

/usr/share/doc/packages/glib/ChangeLog

/usr/share/doc/packages/glib/NEWS

/usr/share/doc/packages/glib/README

mauede@bordighera:~/miRTA-Dir/Parini-Dir/galopps/galopps3.2.4.Parini/miRTA_MEM>
rpm -ql glib-devel
/usr/bin/glib-config

/usr/include/glib-1.2

/usr/include/glib-1.2/glib.h

/usr/include/glib-1.2/gmodule.h

/usr/lib/glib
/usr/lib/glib/include
/usr/lib/glib/include/glibconfig.h
/usr/lib/libglib.a
/usr/lib/libglib.la
/usr/lib/libglib.so
/usr/lib/libgmodule.a
/usr/lib/libgmodule.la
/usr/lib/libgmodule.so
/usr/lib/libgthread.a
/usr/lib/libgthread.la
/usr/lib/libgthread.so
/usr/lib/pkgconfig/glib.pc
/usr/lib/pkgconfig/gmodule.pc
/usr/lib/pkgconfig/gthread.pc
/usr/share/aclocal/glib.m4
/usr/share/info/glib.info.gz
/usr/share/man/man1/glib-config.1.gz

Nevertheless gcc cannot find it. In fact:

mauede@bordighera:~/miRTA-Dir/Parini-Dir/galopps/galopps3.2.4.Parini/miRTA_MEM>
gcc miRTA_MEM-main.c -o miRTA_MEM
miRTA_MEM-main.c:8:18: error: glib.h: No such file or directory
miRTA_MEM-main.c:10:22: error: external.h: No such file or directory
miRTA_MEM-main.c:15:25: error: glib/gstdio.h: No such file or directory
miRTA_MEM-main.c:21: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’
before ‘*’ token
miRTA_MEM-main.c:114:1: error: unterminated comment

Instead the suggested compilation command line gets further on:

mauede@bordighera:~/miRTA-Dir/Parini-Dir/galopps/galopps3.2.4.Parini/miRTA_MEM>
gcc $(pkg-config --cflags --libs glib-2.0) A_MEM-main.c -o miRTA_MEM
miRTA_MEM-main.c:10:22: error: external.h: No such file or directory
miRTA_MEM-main.c:21: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’
before ‘*’ token
miRTA_MEM-main.c:114:1: error: unterminated comment

Yast shows that both glib and the latest version glib-2.0 are installed (see
attachment), which may cause a conflict ... ???
Shall I uninstall glib and leave only glib-2.0 installed ?

Thank you very much.
Maura




--
Every time I hear someone whining about vi or emacs, I give
them ed to play
with. Shuts them up PDQ.         
               
             
   -- stevo
--
To unsubscribe, e-mail: opensuse+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: opensuse+help@xxxxxxxxxxxx




< Previous Next >