help-octave
[Top][All Lists]
Advanced

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

RE: Debugging octave mex files


From: Trigui, Hafedh (OTT)
Subject: RE: Debugging octave mex files
Date: Tue, 29 Nov 2011 02:35:07 +0000

I did not use mex or any other command at octave prompt. I solely relied on 
compile and build solution from the GUI of VC++. Then, I manually rename the 
dll file to a mex file.
In octave prompt, I only define the parameters of the mex function and call the 
function.
This time was fine since the function is not doing more than printf and 
returning an integer as an output.
I am worried of the next step when I will have hundreds or thousands of C++ 
code and a debug could be necessary.  

-----Original Message-----
From: Michael Goffioul [mailto:address@hidden 
Sent: Monday, November 28, 2011 5:39 PM
To: Trigui, Hafedh (OTT)
Cc: Ben Abbott; Jordi GutiƩrrez Hermoso; address@hidden
Subject: Re: Debugging octave mex files

On Mon, Nov 28, 2011 at 10:25 PM, Trigui, Hafedh (OTT) <address@hidden> wrote:
> I downloaded octave from http://www.gnu.org/software/octave/download.html 
> more than a year ago.
> I never touched the source code of octave. I am just a user of octave.

The main question is: how did you compile your MEX file?
I'm gonna assume you used the "mex" command at octave prompt. If yes, this 
means you didn't compile the MEX file with VC++, but with MinGW, which is the 
compiler that was used to create the octave release you're using. This also 
means you can't debug it using VC++. You need to use MinGW gdb for that.
OTOH if you manage to use VC++ to compile and link your MEX file against the 
octave libraries (theoretically this is possible as the MEX interface is 
C-only), then normally you should be able to debug with VC++, but only the code 
that's in your MEX file. However, I would not recommend such combination of 
compilers, as you'll end up mixing C runtime DLL's, leading to various problems 
at runtime.

Michael.

-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
This e-mail from Ultra Electronics and any attachments to it are confidential 
to the intended recipient and may also be privileged.
If you have received it in error please notify the sender and delete it from 
your system.
If you are not the intended recipient you must not copy it or use it for any 
purpose nor disclose or distribute its contents to any other person.
All communications may be subject to interception or monitoring for operational 
and/or security purposes.
Please rely on your own virus checking as the sender cannot accept any 
liability for any damage arising from any bug or virus infection.


Ce courriel de Ultra Electronics est destine a la personne a laquelle il est 
adresse et peut contenir des renseignements privilegies et confidentiels.
Si vous avez recu ce courriel par erreur, veuillez aviser l'expediteur et 
l'effacer de votre systeme. 
Si vous n'etes pas le destinataire, vous ne devez ni copier, ni l'utiliser pour 
quel qu'usage que ce soit, ni le faire suivre a d'autres.
Toutes les communications sont assujetties a une surveillance et/ou 
interception pour des besoins operationnels et/ou de securite.
Vous etes tenu de vous fier a votre anti-virus car l'expediteur n'acceptera 
aucune responsabilite des dommages causes par un virus ou un bogue.
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------



reply via email to

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