initializing newmat library

Hello everyone,

I am pretty beginner in C++ and trying to use a library called "newmat10". However, when I writing just the following code to create a new matrix: "Matrix deneme(4,4);" , I am getting a bunch of errors starting with:

error LNK2019: unresolved external symbol "public: __thiscall Matrix::Matrix(int,int)" (??0Matrix@@QAE@HH@Z) referenced in function _wmain

I am guessing I haven't add the libraries properly. What I did was, I donwnloaded the "newmat10" folder from the following web page:

"robertnz.net/download.html"

Then in the Visual Studio I right clicked to my project-->properties-->C/C++ and to the "Additional Include Directories" I have written the path for "newmat10" folder.

Moreover, at the start of the code I have written the following lines:

#define WANT_STREAM // include.h will get stream fns
#define WANT_MATH // include.h will get math fns
// newmatap.h will get include.h
#include "newmatap.h" // need matrix applications
#include "newmatio.h" // need matrix output routines
#include <newmat.h>
#ifdef use_namespace
using namespace NEWMAT; // access NEWMAT namespace
#endif


So, what should I do more to get this program running?

thanks in advance
You need to link the actual library.
thanks for the fast response. i do not understand what you mean by linking the actual library. i am really new in this business :(
The header "newmat.h" only has the names of the functions, not what they do. Based on your compiler, you need to "link" the library, which basically means tell the linker to add the function definitions.
Topic archived. No new replies allowed.