[vtkusers] Compiling VTK in cygwin

Mathieu Malaterre mathieu.malaterre at gmail.com
Mon Dec 29 04:27:29 EST 2008


On Mon, Dec 29, 2008 at 8:29 AM, Andrey Sklyar <skyarland at gmail.com> wrote:
> Adding the macro definitions to vtkWin32VideoSource.cxx allowed VTK to
> compile on my machine.  I still think that there has to be a way of
> getting it to compile without having to edit the source file...

oh... now I remember. An automated way has been added sometime around
~VTK5.0, now vtkWin32VideoSource gets compiled automatically (while it
used to be an advanced option) when the result of a try compile is
positive:

...
  IF (VTK_VFW_SUPPORTS_CAPTURE)
    SET (Kit_SRCS ${Kit_SRCS} vtkWin32VideoSource.cxx)
  ENDIF (VTK_VFW_SUPPORTS_CAPTURE)
...

If you check CMake/vtkTestVideoForWindows.cmake, you'll see that only
the linker is being tested (not all required symbols/macros), thus
resulting in your issues.

the surprising part is that it works out of the box for the nightly dashboard:
http://www.cdash.org/CDash/viewNotes.php?buildid=239291


> --- vtkWin32VideoSourceORIGINAL.cxx     2006-12-20 09:39:38.000000000 -0500
> +++ vtkWin32VideoSource.cxx     2008-12-29 00:14:17.975155200 -0500
> @@ -34,6 +34,30 @@
>  #pragma warning (pop)
>  #endif
>
> +
> +// ------------------------------------------------------------------
> +//  CapControlCallback states - from
> +//  http://www.hjrx.cn/software/BCB6/INSTALL/program%20files/Borland/
> +//  CBuilder6/Include/avicap.h
> +// ------------------------------------------------------------------
> +#define CONTROLCALLBACK_PREROLL         1 /* Waiting to start capture */
> +#define CONTROLCALLBACK_CAPTURING       2 /* Now capturing */
> +
> +// ------------------------------------------------------------------
> +// String IDs from status and error callbacks - from
> +//  http://www.hjrx.cn/software/BCB6/INSTALL/program%20files/Borland/
> +//  CBuilder6/Include/avicap.h
> +// ------------------------------------------------------------------
> +
> +#define IDS_CAP_BEGIN               300  /* "Capture Start" */
> +#define IDS_CAP_END                 301  /* "Capture End" */
> +
> +// ------------------------------------------------------------------
> +// from http://ucanvcam.googlecode.com/svn-history/r4/trunk/modules/
> +// vdub/cap_vfw.cpp
> +// ------------------------------------------------------------------
> +#define AVSTREAMMASTER_NONE 1
> +
>  class vtkWin32VideoSourceInternal
>  {
>  public:

Cool ! Added to:

http://vtk.org/Bug/view.php?id=635

I'd suggest you forward your email to the cygwin mailing list. Until
the try_compile test in VTK is fixed (open a bug report if you want).

Thanks & congrats !
-- 
Mathieu



More information about the vtkusers mailing list