Macro problem ???

Brian Alexander Todd bat5 at po.cwru.edu
Mon Apr 3 09:24:55 EDT 2000


Hello vtkusers,

I have a C++ application that works dandy under
Linux and I'm trying to port it to Windows.  I'm
having problems with the following lines:

int fextent[6];

vtkImageReader *ireader = vtkImageReader::New();
	...
	ireader->SetDataExtent( fextent[0], fextent[1],
 		fextent[2],fextent[3],fextent[4], fextent[5] );
	...

The "ireader->SetDataExtent( ... )" line causes an access violation.

If I change that line to:

vtkImageReader *ireader = vtkImageReader::New();
	...
	ireader->SetDataExtent( fextent );
	...

I don't get an immediate crash and access violation but 
several pointers get corrupted and it soon crashes.

I narrowed it down to two possible (possibly I'm wrong also)
causes.  First, I know that the SetDataExtent is constructed
from a macro.  Are there any preprocessor definitions that 
I need to set?  Also, in my app I am combining vtk with 
another library.  That library will currently not link with
the "debug multithreaded" run-time option set (as suggested 
in the User's Guide).  Do either of these seem like possible
culprits?

In a related question, does anyone now of a good resource
for example makefiles (not necessarily for vtk)?

Thanks,
Brian Todd



Brian Todd				"Evidently the operation of
email:      bat5 at po.cwru.edu		differentiation is rather 
home:       (216) 321-8882		unpleasent.  It can transform 
office:     (216) 368-4209		a nice function into one much
fax:        (216) 368-4969		less behaved" 	-GM Wing

--------------------------------------------------------------------
This is the private VTK discussion list. Please keep messages on-topic.
Check the FAQ at: <http://public.kitware.com/cgi-bin/vtkfaq>
To UNSUBSCRIBE, send message body containing "unsubscribe vtkusers" to
<majordomo at public.kitware.com>. For help, send message body containing
"info vtkusers" to the same address.
--------------------------------------------------------------------



More information about the vtkusers mailing list