[Top][All Lists]

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

C++ functions

From: Robert Widura
Subject: C++ functions
Date: Mon, 2 Jun 2003 06:31:25 -0500

I have some problems with the implementation of multiple C++ functions, when I 
use the 
command "mkoctfile". To understand how it works, I have written the following 3 
#include <oct.h> 
#include "funktion_oct.h" 
DEFUN_DLD(funkprojekt_oct, args, , "test") 
        octave_value_list retval; 
        for (int i=1; i<=9; i++) 
                retval(i) = f(i); 
        return retval; 
extern octave_value f(int i); 
#include "funktion_oct.h" 
DEFUN_DLD(f,args, ,"function definition") 
        octave_value_list retval; 
        int i; 
        i = args(0).int_value(); 
        retval(0) = i*i; 
        return retval; 
Now, when I am typing "mkoctfile" it is compiled without any 
errors. But when 
I try to start the function funkprojekt_oct at the Octave-prompt, I get the 
octave: relocation error: /home/octave/funkprojekt_oct.oct: undefined symbol: 
I would be glad, if you could help me with this special case and if you could 
explain to me the 
more general context... 
Thanks a lot, 
Robert Widura 
UNICEF bittet um Spenden für die Kinder im Irak! Hier online an
UNICEF spenden:

Octave is freely available under the terms of the GNU GPL.

Octave's home on the web:
How to fund new projects:
Subscription information:

reply via email to

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