Re: glib gmodule - help.




 GOSH... Can I at least look at the source code before asking questions ???

 My bad..

 I looked at the source code and saw that if "lib" is part of the name passed
in, it assumes your are passing the name with an ".so" appended. If "lib" is
not
part of the name, it assumes you are using the logical module name and prepends
"lib" and apends ".so" to the name.

 Again, my bad.

 Thank anyway.

Harring

--- Harring Figueiredo <harringf yahoo com> wrote:


 I am trying to load a shared lib using gmodule, but for some reason the lib
cannot be found.

  Here is a desc. of what I am doing:

  Program: 
  ./testgmodule  ( can be found on /glib-1.2.10/gmodule souce code
distribution)

  I modified line 63 from:
plugin_a = g_strconcat (string, "/.libs/", "libgplugin_a.so", NULL);

to:

plugin_a =
g_module_build_path("/mnt/hdd1/downloads/glib-1.2.10/gmodule/.libs","libgp");

 The glib doc for g_module_build_path says: 
"The platform-specific prefix and suffix are added to the
filename, if needed, and the result is added to the directory, using the
correct separator character. "

 However I get the following error when I run the program:

error: /mnt/hdd1/downloads/glib-1.2.10/gmodule/.libs/libgplugin_a: cannot
open
shared object file: No such file or directory.

NOTE: Using the original version, it works.
 
I am doing something wrong here ?
I am running on Linux.

 Question 2: ltdl (libtool) searchs for the lib using the LD_LIBRARY_PATH,
does
glib search on these paths as well ?


Thanks in advance.

HArring
                                                                             
  

__________________________________________________
Do You Yahoo!?
LAUNCH - Your Yahoo! Music Experience
http://launch.yahoo.com
_______________________________________________
gtk-app-devel-list mailing list
gtk-app-devel-list gnome org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list


__________________________________________________
Do You Yahoo!?
LAUNCH - Your Yahoo! Music Experience
http://launch.yahoo.com



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