[vtkusers] Conversion to v4.0

William A. Hoffman billlist at nycap.rr.com
Mon Jun 17 16:38:42 EDT 2002

In windows.h GetCurrentTime is #define to GetCurrentTime[AD] depending on if you are debug or release.   (There are about 1000 of these #define's in windows.h.)

To get around this problem in vtkTimerLog.h VTK now has this macro:

// The microsoft compiler defines this as a macro, so
// undefine it here
#undef GetCurrentTime

class VTK_COMMON_EXPORT vtkTimerLog : public vtkObject

You could try re-ordering your #include lines.


At 06:13 PM 6/17/2002 +0100, James C. Robinson wrote:
>Dear All,
>I am currently trying to convert from VTK v3.2 to v4.0. I am recompiling my
>code and am getting a strange error. The following line:
>PauseSpan += CTime::GetCurrentTime() - Pause_time ;
>Results in the following error:
>C:\Jim\Programming\mfc\Kes\PanMeshv3.1\GraphWindow.cpp(465) : error C2039:
>'GetCurrentTime' : is not a member of 'CTime'
>        C:\Program Files\Microsoft Visual
>Studio\VC98\MFC\Include\afx.h(1532) : see declaration of 'CTime'
>C:\Jim\Programming\mfc\Kes\PanMeshv3.1\GraphWindow.cpp(465) : error C2065:
>'GetCurrentTime' : undeclared identifier
>However, the definition of CTime does include a GetCurrentTime method:
>class CTime
>// Constructors
>        static CTime PASCAL GetCurrentTime();
>If I remove the include files that are connected to vtk this error
>disappears. Has anybody an idea of the source of the error (NB: The same
>file compiles without erro when the include files are the v3.2 versions).
>Dr. James C. Robinson, BE,MEngSc,PhD,CEng,MIEI,
>Kepler Engineering Software Ltd.,
>42 Rivergrove,
>Glanmire, Co. Cork,
>Tel:         +353-21-4822028
>Tel:         +353-87-2393010
>Fax:        +353-21-4822721
>E-mail:     j.robinson at kepler.ie
>This is the private VTK discussion list. 
>Please keep messages on-topic. Check the FAQ at: <http://public.kitware.com/cgi-bin/vtkfaq>
>Follow this link to subscribe/unsubscribe:

More information about the vtkusers mailing list