Hi,
I am new to ocatve and want to integrate it with VS2010. my working IDE is Qt and the compiler is of Visual C++ 2010. the steps i carried out are as follows:
1.) installed octave-3.6.1-vs2010-setup.exe under the name C:\Octave folder
2.) added the bin folder of Octave to the environment variable "PATH"
3.) added the include file path and lib file path to the .pro file of Qt project
INCLUDEPATH +=
C:\Octave\include\octave-3.6.1\octave\
C:\Octave\include\
LIBS +=-LC:\Octave\lib\octave\3.6.1\
-loctave
-loctinterp
-lcruft
LIBS += -LC:\Octave\lib\
4.) tried running the following code
#include <iostream>
#include <octave/oct.h>
int
main (void)
{
std::cout << "Hello Octave world!\n";
int n = 2;
Matrix a_matrix = Matrix (n, n);
for (octave_idx_type i = 0; i < n; i++)
{
for (octave_idx_type j = 0; j < n; j++)
{
a_matrix (i, j) = (i + 1) * 10 + (j + 1);
}
}
std::cout << a_matrix;
return 0;
}
But duirng build i get the following erroe
main.obj:-1: error: LNK2019: unresolved external symbol "__declspec(dllimport) public: __thiscall octave_value::~octave_value(void)" (__imp_??1octave_value@@address@hidden) referenced in function "public: void * __thiscall octave_value::`vector deleting destructor'(unsigned int)" (??_Eoctave_value@@address@hidden)