Re: [gnet] examples.



The examples Makefile uses gnet-config, not pkg-config.  My guess is that
gnet-config isn't in your path, or an old version of gnet-config is in
your path.

But, pkg-config should include {prefix}/lib/gnet/include - that's where
gnetconfig.h, which is generated at compile time, is put.


This is what I have when gnet is installed in ~/local/Linux/i686:

[speak] dhelder -: pkg-config gnet --libs
 -L/n/speak/z/home/dhelder/local/Linux/i686/lib -lgnet -lgthread -lglib
-lpthread

[speak] dhelder -: pkg-config gnet --cflags
-D_REENTRANT -I/n/speak/z/home/dhelder/local/Linux/i686/include/gnet
-I/n/speak/z/home/dhelder/local/Linux/i686/lib/gnet/include/
-I/usr/include/glib-1.2 -I/usr/lib/glib/include

David






On Sat, 20 Apr 2002, Miroslav Hudec wrote:
>   I just want to try the gnet library for our project. However I had some
> troubles while compiling  the examples - due to  bad path specification
>
> (it is a little bit long )
>
>  I compiled gnet  with
>
> export PATH=$PATH:/xtr/pkgconfig/bin/
> export PKG_CONFIG_PATH=/xtr/glib-2.0.1/lib/pkgconfig
> ./configure --prefix=/xtr/gnet-1.1.2 --enable-glib2 --enable-debug=yes
> make
> make install
>
> cd examples
> export  PKG_CONFIG_PATH=/xtr/glib-2.0.1/lib/pkgconfig:/xtr/gnet-1.1.2/lib/pkgconfig
>
> and then:
> [neuron]<14:30><~/d/gnet-1.1.2/examples>gcc -g -Wall  -DGNET_EXPERIMENTAL=1 echoserver.c `pkg-config --cflags --libs gnet`
> echoserver.c:24: gnet/gnet.h: No such file or directory
>
> [neuron]<14:32><~/d/gnet-1.1.2/examples>pkg-config --cflags  gnet
> -D_REENTRANT -I/xtr/gnet-1.1.2/include/gnet
> -I/xtr/glib-2.0.1/include/glib-2.0 -I/xtr/glib-2.0.1/lib/glib-2.0/include
>
> well I added a line with -I/xtr/gnet-1.1.2/include/ to the gcc's command
> line
> [neuron]<14:33><~/d/gnet-1.1.2/examples>gcc -g -Wall
> -DGNET_EXPERIMENTAL=1 echoserver.c `pkg-config --cflags --libs gnet` -I/xtr/gnet-1.1.2/include/
> In file included from echoserver.c:24:
> /xtr/gnet-1.1.2/include/gnet/gnet.h:26: gnetconfig.h: No such file or
> directory
> In file included from /xtr/gnet-1.1.2/include/gnet/gnet.h:36,
>                  from echoserver.c:24:
> /xtr/gnet-1.1.2/include/gnet/server.h:28: gnetconfig.h: No such file or
> directory
>
> so the gnet.h has been found , not so gnetconfig.h . found it in
> [neuron]<14:34><~/d/gnet-1.1.2/examples>find /xtr/gnet-1.1.2 -name "gnetconfig.h"
> /xtr/gnet-1.1.2/lib/gnet/include/gnetconfig.h
>
> But why is it in the lib/gnet/include and not in  include/gnet ?
>
> no problem  I added  the path to the -I
>
> gcc -g -Wall  -DGNET_EXPERIMENTAL=1 echoserver.c `pkg-config --cflags
> --libs gnet` -I/xtr/gnet-1.1.2/include/ -I/xtr/gnet-1.1.2/lib/gnet/include/
>
> and everything is ok :) som maybe you should  fix the paths as well as
> Makefile  in examples,  in the next release, please :)


-- 
      __          _    __ David Helder - dhelder umich edu
  ___/ /__ __  __(_)__/ / <http://www.eecs.umich.edu/~dhelder>
 / _  / _ `/ |/ / / _  /  Jungle Monkey: <http://www.junglemonkey.net>
 |_,_/|_,_/|___/_/|_,_/   Paper CD Case: <http://www.papercdcase.com>




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]