[vtkusers] Compiling VTK in cygwin

Andrey Sklyar skyarland at gmail.com
Mon Dec 29 02:29:34 EST 2008


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...

--- 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:

- Andrey

On Sun, Dec 28, 2008 at 10:44 PM, Andrey Sklyar <skyarland at gmail.com> wrote:
>> Simple rule: do not turn ON advanced options you do not understand.
> Advice taken to heart.  I am still getting the same error, even with
> the default options, though.
>
>> By default VTK is building fine on cygwin (see nightly dashboard).
> What version of cygwin, cygwin packages (gcc, g++, make, cmake), and
> compilation settings (CC, CXX, CFLAGS, CXXFLAGS, and cmake settings)
> is run in the test below?  When I tried using the default settings (as
> described below) I still got the same error.  Also, does that
> configuration require editing any of the win32api files (vxf.h, for
> example)?
>
> Site Name: dash14.kitware
> Build Name: Win32-cygwin344
>
> Further details
> ------------------------------------------
> I was able to compile vtk-5.2.0 successfully with cygwin with the
> default configuration on two different Windows XP machines in October,
> but I keep getting the same error in
> /usr/src/vtkcvs/VTK/Hybrid/vtkWin32VideoSource.cxx when I try to do it
> now.
>
>> If you sole goal is to compile VTK, do not turn cmake option you do
>> not understand. By default VTK is building fine on cygwin (see nightly
>> dashboard). I guess shared lib is the only one I'd suggest.
>
> I just tried to do this from scratch today (12/28/2008).  I
> - deleted the cygwin directory
> - Downloaded http://www.cygwin.com/setup.exe and installed cygwin
> - Added the packages, gcc, g++, make, and cmake, cvs, and subversion
> - Downloaded http://www.vtk.org/files/release/5.2/vtk-5.2.0.tar.gz and
> http://www.vtk.org/files/release/5.2/vtkdata-5.2.0.tar.gz
> - Extracted VTK and VTKData into the /usr/src directory
> - Created VTKbin in the /usr/src directory and cd into it
> - Set CC=/bin/gcc.exe and CXX=/bin/g++.exe
> - ran ccmake ../VTK, accepting all of the default options at 5:15 pm
> - At 6:30 pm, with 80% of the build complete, got the same error with
> vtkWin32VideoSource.cxx
>
>> What is the output of c++ --version vs g++ --version...
> They are the same - as Mathieu said, c++ is just a symlink to g++.
>
> - Andrey
>



More information about the vtkusers mailing list