After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 492114 - Build issues on Windows/MSVC
Build issues on Windows/MSVC
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-base
0.10.14
Other Windows
: Normal normal
: 0.10.15
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2007-10-31 14:45 UTC by Ole André Vadla Ravnås
Modified: 2007-11-01 12:54 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Some additional symbols need to be exported. (2.17 KB, patch)
2007-10-31 14:46 UTC, Ole André Vadla Ravnås
committed Details | Review
Added two casts needed to avoid MSVC warnings when compiling GstRingBuffer. (595 bytes, patch)
2007-10-31 14:47 UTC, Ole André Vadla Ravnås
reviewed Details | Review
Fixed a critical GstRTPHeader packing issue with MSVC. (539 bytes, patch)
2007-10-31 14:52 UTC, Ole André Vadla Ravnås
none Details | Review
Fixes a MSVC runtime error when using the debug CRT. (308 bytes, patch)
2007-10-31 14:57 UTC, Ole André Vadla Ravnås
committed Details | Review
Fixed some #undefs to shut up MSVC. (1.16 KB, patch)
2007-10-31 19:32 UTC, Ole André Vadla Ravnås
committed Details | Review

Description Ole André Vadla Ravnås 2007-10-31 14:45:34 UTC
Please describe the problem:
gst-plugins-base doesn't build properly with Windows/MSVC (MSVS2005).
There are also some symbols missing in the .def file that need to be exported.

Steps to reproduce:
1. 
2. 
3. 


Actual results:


Expected results:


Does this happen every time?


Other information:
Comment 1 Ole André Vadla Ravnås 2007-10-31 14:46:23 UTC
Created attachment 98250 [details] [review]
Some additional symbols need to be exported.
Comment 2 Ole André Vadla Ravnås 2007-10-31 14:47:51 UTC
Created attachment 98251 [details] [review]
Added two casts needed to avoid MSVC warnings when compiling GstRingBuffer.
Comment 3 Ole André Vadla Ravnås 2007-10-31 14:52:16 UTC
Created attachment 98252 [details] [review]
Fixed a critical GstRTPHeader packing issue with MSVC.

A colleague (Haakon Sporsheim) might already have submitted this patch. Including it just in case.
Comment 4 Ole André Vadla Ravnås 2007-10-31 14:57:08 UTC
Created attachment 98253 [details] [review]
Fixes a MSVC runtime error when using the debug CRT.

MSVC requires you to mask when data loss is intentional. It compiles in run-time checks to catch this when building with the debug C runtime, causing run-time checks failing with videotestsrc.
Comment 5 Ole André Vadla Ravnås 2007-10-31 19:32:18 UTC
Created attachment 98266 [details] [review]
Fixed some #undefs to shut up MSVC.

MSVC doesn't like "#undef FOO 1", unlike gcc, so this results in warnings.
Comment 6 Tim-Philipp Müller 2007-11-01 12:54:35 UTC
Thanks for the patches.

The ringbuffer warning fix I've done slightly differently (just return NULL).

The rtp header packing has already been fixed, as you said.

The config.h patch should really be against config.h.in :)

  2007-11-01  Tim-Philipp Müller  <tim at centricular dot net>

        Patch by: Ole André Vadla Ravnås  <ole.andre.ravnas@tandberg.com>

        * gst-libs/gst/audio/gstringbuffer.c: (build_linear_format),
          (gst_ring_buffer_parse_caps):
          Return NULL instead of an enum that happens to be 0, fixes warning
          on MSVC (#492114).

        * gst-libs/gst/audio/gstringbuffer.h:
          No trailing commas in enum list (for gcc-2.9x).

        * gst/videotestsrc/videotestsrc.c: (random_char):
          Make information loss explicit instead of implicitly truncating to
          eight bits via the return value.  Fixes runtime error on MSVC when
          using the debug CRT (#492114).

        * win32/common/config.h.in:
          Fix a bunch of '#undef FOO bar', which MSVC doesn't like (#492114).

        * win32/common/libgstinterfaces.def:
        * win32/common/libgstrtp.def:
          Export a few more symbols (#492114).