Re: g_module_build_path on Win32



Tor Lillqvist wrote:
Rick Jones writes:
 > > If one specifies the full name of the dll including the ".dll",
 > > g_module_build_path() doesn prepend "lib".

 > is that full absolute name, or a "full basename?"

read the code? ;)

you guys are just like my mother. when I was growing up and asked her how to spell something she'd tell me to go look it up in the dictionary :)

in my defence, I did read the online API reference at:

http://developer.gnome.org/doc/API/2.0/glib/index.html

and then:

http://developer.gnome.org/doc/API/2.0/glib/glib-Dynamic-Loading-of-Modules.html#g-module-build-path

which reads:

  For example, calling g_module_build_path() on a Linux system with a
  directory of /lib and a module_name of "mylibrary" will return
  /lib/libmylibrary.so. On a Windows system, using \Windows as the
  directory it will return \Windows\mylibrary.dll.

which appears to be in contradiction with what's been said in the email string thusfar - I would have thought that the Windows example would be \Windows\libmylibrary.dll

Might be good to flesh-out the examples a bit and explain the whole thing.


Since g_module_open knows how to deal with .la files, should g_module_build_path() special case seeing a .la at the end of the module_name?

Looking at the previously posted source, and:

http://cvs.gnome.org/viewcvs/glib/gmodule/gmodule-dl.c?rev=1.13&view=markup

suggests that it does not.


full basename...

But then you could as well just call g_build_filename (directory, dllname, NULL)

for now I am indeed using g_build_filename and ass-u-me-ing that the user configured a full basename for the library.

rick jones



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