Problems building QtGStreamer release build on Windows

Chris Boucher chris at thebouchers.com
Fri Dec 14 03:15:00 PST 2012


Hi Andoni,

Thanks!

QtGStreamer is built using cmake, which I'm far from an expert in, so
I'm not sure how best to use the GStreamer SDK property sheet with it.
However, I modified the top level CMakeLists.txt as follows:

--- CMakeLists.txt (revision 18879)
+++ CMakeLists.txt (working copy)
@@ -108,6 +108,10 @@
     set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra
-Wformat-security -Wundef -Wpointer-arith -fno-common")
 endif ()

+if (MSVC)
+    set(CMAKE_SHARED_LINKER_FLAGS "/OPT:NOREF")
+endif()
+
 set(LIB_INSTALL_DIR ${CMAKE_INSTALL_PREFIX}/lib${LIB_SUFFIX} CACHE
STRING "Destination directory for libraries")
 set(INCLUDES_INSTALL_DIR ${CMAKE_INSTALL_PREFIX}/include/QtGStreamer)

and the release DLLs now contain complete import sections. /OPT:NOREF
is the default in debug builds, which explains why it worked there.

I have to say, I find the CRT fix a little odd and possibly
impracticable since I have other libraries I need to link against
(including Qt), but that's not relevant to this thread.

Thanks again,
Chris.

On 14 December 2012 10:27, Andoni Morales <ylatuya at gmail.com> wrote:
> Hi,
>
> On Visual Studio, make sure that you use the property sheets included
> in the GStreamer SDK as explained in "Remove the dependency with the
> Visual Studio runtime" here:
>  include the property sheets:
> http://docs.gstreamer.com/display/GstSDK/Installing+on+Windows
>
> Apart from linking to the same CRT used by the DLL's built with
> GStreamer, it will also set the the linker option
> OptimizeReferences=False, which will fix your issue in the Release
> build:
> http://cgit.freedesktop.org/gstreamer-sdk/cerbero/tree/data/vs/msvc/common.props#n15
>
> I will update the bug report.
>
> 2012/12/14 Ola Røer Thorsen <ola at silentwings.no>:
>> Hi Chris,
>>
>> I'm having the exact same problems as you, using visual studio 2010. I
>> reported this on the bugtracker too, btw.
>> https://bugzilla.gnome.org/show_bug.cgi?id=686272 but it seems we're the
>> unlucky ones.
>>
>> If you figure it out, please let me know :-)
>>
>> Cheers,
>> Ola
>>
>>
>>
>> 2012/12/13 Chris Boucher <chris at thebouchers.com>
>>>
>>> Hi Dinesh,
>>>
>>> Thanks for confirming that your import tables are correct.
>>>
>>> I'm going to try VS2010...
>>>
>>> Regards,
>>> Chris.
>>>
>>> On 13 December 2012 16:07, Dinesh Kumar <dineshkpadmanaban at gmail.com>
>>> wrote:
>>> > Hi Chris,
>>> >
>>> > Thanks for correcting me.
>>> >
>>> > I have just now checked my QtGlib.dll. I have my import table correct.
>>> >
>>> > My last suggestion is
>>> >
>>> > Clean the existing build.
>>> > - cmake -G "Visual Studio 8 2005" <other stuffs>
>>> >   - cmake --build . --target install --config Release.
>>> >
>>> > Regards
>>> > Dinesh P
>>> >
>>> >
>>> >
>>> > On Thu, Dec 13, 2012 at 8:50 PM, Chris Boucher <chris at thebouchers.com>
>>> > wrote:
>>> >>
>>> >> Hi Dinesh,
>>> >>
>>> >> The QtGStreamer release build isn't producing the gstreamer dlls, but
>>> >> it is linking to them.
>>> >>
>>> >> The QtGStreamer dlls are linked against the gstreamer ones, which
>>> >> results in QtGStreamer dlls having an import section listing the
>>> >> gstreamer dlls and functions required.
>>> >>
>>> >> If you run "dumpbin /imports QtGlib.dll" (for example) you should see
>>> >> sections for libgobject-2.0-0.dll and libglib-2.0-0.dll.
>>> >>
>>> >> In my debug build these sections also list the functions required. In
>>> >> my release build, the sections exist, but there are no functions
>>> >> listed.
>>> >>
>>> >> Thanks,
>>> >> Chris.
>>> >>
>>> >> On 13 December 2012 15:04, Dinesh Kumar <dineshkpadmanaban at gmail.com>
>>> >> wrote:
>>> >> > You  mean the relase build is producing dlls with empty import tables
>>> >> > for
>>> >> > gstreamer dlls or QtGstreamer dlls?
>>> >> >
>>> >> > I am still wondering, why the QtGstreamer release build is producing
>>> >> > the
>>> >> > gstreamer dlls?
>>> >> >
>>> >> > Regards
>>> >> > Dinesh P
>>> >> >
>>> >> >
>>> >> > On Thu, Dec 13, 2012 at 8:08 PM, Chris Boucher
>>> >> > <chris at thebouchers.com>
>>> >> > wrote:
>>> >> >>
>>> >> >> gstreamer dlls.
>>> >> >
>>> >> >
>>> >> >
>>> >> > _______________________________________________
>>> >> > gstreamer-devel mailing list
>>> >> > gstreamer-devel at lists.freedesktop.org
>>> >> > http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
>>> >> >
>>> >> _______________________________________________
>>> >> gstreamer-devel mailing list
>>> >> gstreamer-devel at lists.freedesktop.org
>>> >> http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
>>> >
>>> >
>>> >
>>> > _______________________________________________
>>> > gstreamer-devel mailing list
>>> > gstreamer-devel at lists.freedesktop.org
>>> > http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
>>> >
>>> _______________________________________________
>>> gstreamer-devel mailing list
>>> gstreamer-devel at lists.freedesktop.org
>>> http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
>>
>>
>>
>> _______________________________________________
>> gstreamer-devel mailing list
>> gstreamer-devel at lists.freedesktop.org
>> http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
>>
>
>
>
> --
> Andoni Morales Alastruey
>
> LongoMatch:The Digital Coach
> http://www.longomatch.ylatuya.es
> _______________________________________________
> gstreamer-devel mailing list
> gstreamer-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel


More information about the gstreamer-devel mailing list