Re: VTK and Cocoa on Mac OS X
Re: VTK and Cocoa on Mac OS X
- Subject: Re: VTK and Cocoa on Mac OS X
- From: p3consulting <email@hidden>
- Date: Mon, 12 Jul 2004 09:39:47 +0200
Le juil. 11, 2004, ` 21:57, Albion Baucom a icrit :
>
>
I ultimately need to pass a file name to an object that uses data to
>
instantiate a new view, but including any headers of anything that
>
includes VTK in my Objective-C causes the fault. There are no warnings
>
during complilation that indicate this might happen.
>
>
Apart of the problem of different init method for the GL view when
initialized by code and by nib,
(well known source of crashes or empty screen)
and if the problem is actually created by the inclusion of the headers,
you should also check for conflicting
typedef...
Some headers do think like this
#ifndef _TYPE_A_
typedef ... TypeA
#define _TYPE_A_
#endif
If TypeA is common to VTK and the Mac and are different, then it's very
likely to cause crashes at runtime.
because the #ifndef construct will actually hide the problem !
Real life example:
the Size type defined in header "c.h" of PostgreSQL as being
typedef size_t Size ;
when being a struct in MacTypes.h ...
which obliges you to split source code in two pieces:
A.c includes PostgreSQL (or in your case VTK header) + B.h
(A.c acting as a glue to B.c where the real job is done)
B.c includes B.h + Foundation.h
that's the only way to make an PostgreSQL external function calling
Foundation code...
maybe you are facing something similar here...
(if the problem is actually generated by the inclusion of the
headers... )
Since your code crash in a Hash function, look for some Init function
(if there is any) for the hashing
being actually called !
The right init... not being called - because of function name conflict
in some header: no linker warning ? have you turn off "duplicate
symbol" warning ? - may also have that kind of symptom.
Pascal Pochet
email@hidden
----------------------------------
PGP
KeyID: 0x208C5DBF
Fingerprint: 9BFB 245C 5BFE 7F1D 64B7 C473 ABB3 4E83 208C 5DBF
[demime 0.98b removed an attachment of type application/pkcs7-signature which had a name of smime.p7s]
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.