Sorry but I am not still convinced about the dependency. I did not installed (don't remember if I did) new required lib. And the code is working (gdk_pixbuf_new_from_file exists already).

Here is one example where I load the SVG from file:
[helio@centos64 gretl]$ cvs diff gui2/gretl.c
Index: gui2/gretl.c
===================================================================
RCS file: /cvsroot/gretl/./gretl/gui2/gretl.c,v
retrieving revision 1.809
diff -r1.809 gretl.c
55a56
> #ifndef USE_SVG
56a58
> #endif
2294a2297,2308
> #ifdef USE_SVG
>     GdkPixbuf *icon;
>     GError *tmp_error = NULL;
>     char tmpfname[MAXLEN];
>
> /* VERIFY if OK to use / when using Windows */
>     sprintf(tmpfname,"%svectorimages/%s",gretl_home(), "gretl.svg");
>     icon = gdk_pixbuf_new_from_file((const char *) tmpfname, &tmp_error);
>     if(tmp_error!=NULL) {
>         fprintf(stderr, "Error creating icon: %s\n", tmp_error->message);
>     }
> #else
2295a2310,2311
> #endif
>


I tried to use ldd to see the libs but it only works with dynamic libs and not executables.

Sorry for my insistence.

Hélio



On Tue, Mar 4, 2014 at 5:26 PM, Allin Cottrell <cottrell@wfu.edu> wrote:
On Tue, 4 Mar 2014, Hélio Guilherme wrote:

Better late than never ;)

Thanks for your indulgence ;-)


I am convinced that we do not need to add any new dependency, since I used
GTK2 library that already supported SVG. Is that the case to use inline
SVGs?

To load an SVG file into GTK, GDK's libpixbufloader-svg "loader" module is needed, and it is linked to librsvg. It's possible to compile the loaders into the libgdk_pixbuf library rather than as separate run-time modules, but in that case libgdk_pixbuf itself would end up linked to librsvg.

Allin

_______________________________________________
Gretl-devel mailing list
Gretl-devel@lists.wfu.edu
http://lists.wfu.edu/mailman/listinfo/gretl-devel