help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Passing pointers from mex->octave->mex


From: Jose
Subject: Re: Passing pointers from mex->octave->mex
Date: Tue, 25 Oct 2011 15:32:20 +0300
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.23) Gecko/20110922 Thunderbird/3.1.15

On 10/25/2011 02:29 PM, Arnaud BARRE wrote:
Thanks Arnaud for this valuable reference.

I am testing the code now. I had to do some minor changes to make it work in my 
machine. Here I put them for future reference:

1-Assuming that all the .h and .cpp files are in the same directory (as they 
come in the zip file), change
#include "../ObjectHandle.h" to #include "ObjectHandle.h" in mex_destroy.cpp 
and mex_create.cpp

2-Change lines 113 and 114 of ObjectHandle.h to
typename std::list<ObjectHandle<T>*>::iterator i;
typename std::list<ObjectHandle<T>*>::iterator end= objlist.end();
(note the addition of 'typename')

3-It seems that the code is for 32 bits. As I have a 64 bits machine, I had to 
change all the occurences of mxINT32_CLASS to mxINT64_CLASS (lines 140 and 167)

You can also use the the classID mxDOUBLE_CLASS to be independant of
the machine. Tested and works perfectly with Windows 32/64-bit as well
as Linux Ubuntu 32/64-bit.

Thanks again. It works

J


reply via email to

[Prev in Thread] Current Thread [Next in Thread]