[gst-devel] RE: Win 32 build of 0.8.3

Jory jcsston at wiesneronline.net
Tue Jun 15 08:08:01 CEST 2004


I had the same problem, but you found this fix too fast for me to reply ;),
using dllexport and dllimport. Though the easiest fix was simply commenting
out the line that tried to access the exported var. Using dllexport and
dllimport was much cleaner.

Jory

----- Original Message -----
From: "Marc VanDaele" <Marc_VanDaele at Jabil.com>
To: "'Steve Lhomme'" <steve.lhomme at free.fr>
Cc: <gstreamer-devel at lists.sourceforge.net>; <jcsston at matroska.org>
Sent: Wednesday, June 09, 2004 9:32 AM
Subject: RE: [gst-devel] RE: Win 32 build of 0.8.3


> Steve,
>
> > > running "gst-register fakesrc" also fails with the error
> > > trying to load global_registry
> > > error loading global_registry
> >
> > How did you manage to go until these instructions ?
>
> I only commented the assignment to _gst_registry_auto_load below. (and
made
> a debug build)
> Looking at it in more detail triggered me
> I always thought that a DLL only exports functions (and not variables like
> _gst_registry_auto_load)
> So I checked MSDN and there I found
> "The optional keyword DATA specifies that an export is data, not
> code. For example, you could export a data variable as follows:
> EXPORTS
> i DATA
> "
>
> So I tried modifying the gstreamer.def (adding the DATA to
> _gst_registry_auto_load)
> and then I got an unresolved symbol on _gst_registry_auto_load which was
not
> what I hoped for :-)
>
> Continuing reading MSDN, I found
> "Note that when you export a variable from a DLL with a .def file,
> you do not need to specify __declspec(dllexport) on the variable. However,
> in any file that uses the DLL, you must still use __declspec(dllimport) on
> the declaration of data.
> "
>
> Modifying gst-register.c to
> __declspec(dllimport) extern gboolean _gst_registry_auto_load;
> linked without problems and also didn't trigger the crash anymore.
>
> So I guess the next step is modifying all def files and replacing extern
> with "__declspec(dllimport) extern".
> Does the "_gst" prefix indicates that it is a variable, not a function?
> I can do try this tomorrow; possibly, it also fixes the popt error.
>
> >
> > Unfortunately I can't help until tomorrow evening :(
>
> No problem!
>
> Marc
>





More information about the gstreamer-devel mailing list