I am using Eigen library in C++. According to Eigen documentation:
In order to use Eigen, you just need to download and extract Eigen's source code (see the wiki for download instructions). In fact, the header files in the Eigen subdirectory are the only files required to compile programs using Eigen. The header files are the same for all platforms. It is not necessary to use CMake or install anything.
So in Netbeans I added the directory of Eigen into the "include directories". Then I used a simple program as below (which is provided in Eigen documentation):
#include <iostream>
#include <Eigen/Dense>
using namespace std;
using namespace Eigen;
int main()
{
Matrix3f A;
Vector3f b;
A << 1,2,3, 4,5,6, 7,8,10;
b << 3, 3, 4;
cout << "Here is the matrix A:\n" << A << endl;
cout << "Here is the vector b:\n" << b << endl;
Vector3f x = A.colPivHouseholderQr().solve(b);
cout << "The solution is:\n" << x << endl;
}
Netbeans draws a red underline for colPivHouseholderQr() method!! In addition I can not see the colPivHouseholderQr() method under methods that can be called on object A.
Surprisingly, everything works fine and the program compiles and runs correctly although I have red underline for colPivHouseholderQr() !!
What can be wrong with my configurations ??
This is a reported problem in the Netbeans when using Eigen.
It fails to resolve many object identifiers, including member functions of templated objects such as your colPivHouseholderQr()
function.
The best solution I arrived at was to use Eclipse instead.
The issue is that colPivHouseholderQr()
is in the QR module but you are only including the Dense module.
Try adding the following include:
#include <Eigen/QR>
See: http://eigen.tuxfamily.org/api/group_QR_Module.html
Sorry - this is more of a comment but I am unable to post comments - but did you try deleting the cache? Dont know about windows but in Ubuntu its usually under ~/.netbeans/7.0(or whatever)/var/cache - just delete everything under the cache directory. Sometimes that works for me.