[vtkusers] VTK MAC OSX wrap Java
Daniel Sáez Domingo
dsaez at iti.upv.es
Tue Jun 18 09:43:15 EDT 2002
Hello all,
I once built VTK on a Mac OSX using only Quartz, I had to do some changes
in some files, but it built.
Now I have heard that it's not necessary any change if I get the last source
code version. Then, I have get the last CVS version of CMake, VTKSrc and
VTKData.
If I build without any wrapping, there is no error (well, this goes well),
but when I try to build with wrapping Java, the same error that I found with
the last version appears:
In vtkJavaUtil.cxx: thread.h and synch.h aren't found.
Why this error is prodeced?
In the last version I solved it by adding in vtkJavaUtil.cxx (see ADDED):
#ifdef VTK_USE_SPROC
// for SGI's
#include <abi_mutex.h>
abilock_t vtkGlobalMutex;
static void vtk_get_mutex() {
static int inited = 0;
if (!inited) {
if (init_lock(&vtkGlobalMutex) < 0)
perror("initializing mutex");
inited = 1;
}
spin_lock(&vtkGlobalMutex);
}
static void vtk_release_mutex() {
if (release_lock(&vtkGlobalMutex) < 0)
perror("releasing mutex");
}
#define VTK_GET_MUTEX() vtk_get_mutex()
#define VTK_RELEASE_MUTEX() vtk_release_mutex()
//ADDED
#elif defined(__FreeBSD__) || defined(__linux__) || defined(sgi) || defined
(__APPLE__)
//END ADDED
#include <pthread.h>
pthread_mutex_t vtkGlobalMutex;
#define VTK_GET_MUTEX() pthread_mutex_lock(&vtkGlobalMutex)
#define VTK_RELEASE_MUTEX() pthread_mutex_unlock(&vtkGlobalMutex)
#else
// for solaris
#include <thread.h>
#include <synch.h>
mutex_t vtkGlobalMutex;
#define VTK_GET_MUTEX() mutex_lock(&vtkGlobalMutex)
#define VTK_RELEASE_MUTEX() mutex_unlock(&vtkGlobalMutex)
#endif
Do I have to do this in this version? How do I solve this error?
Thank You
Daniel
More information about the vtkusers
mailing list