Hi,
the way codelite searches for "included files" is currently a little bugged.
For example, if you include a file named:
and the search paths are set to point
codelite will find this file, however the problem starts when the file itself is including another files relative to its position, in your example, Eigen/Dense includes other files:
Code: Select all
#include "Core"
#include "LU"
#include "Cholesky"
#include "QR"
#include "SVD"
#include "Geometry"
#include "Eigenvalues"
so codelite will not be able to find them, since it is searching in the include paths it knows, which are: /usr/include, /usr/include/eigen3
There is a bug for this in SF already opened.
To fix this path problem, add /usr/include/eigen3/src as well to the include paths
Another workaround ( a good one actually
):
Enable clang from the menu (note that you dont have to install anything, just to enable it from the menu):
"Settings -> Tags Settings -> clang -> Enable clang code completion"
This solved everything for me (when ctags failed to complete Vector3d, clang completed it for me)
Another tip:
If you computer is fast enough, remove the completion restrictions that codelite applies on code completion results to boost performance from:
"Settings -> Tags Settings -> Display and behavior -> Number of items to display in the completion box" and change the value from 150 to 500
and a little question:
I installed Eigen and I managed codelite to code-complete for me, but it did not offer Vector3d...
so I did a "find in files" and I could not find its declaration ( I did from both codelite itself and from Windows Explorer search + linux grep...) maybe you can give me a hint
Here is the output of the grep command I ran from the command line:
Code: Select all
root@eran-ubuntu: /tmp/eigen-eigen-ca142d0540d3 $ find . -name "*" | xargs grep --color -i -w vector3d
./doc/C00_QuickStartGuide.dox:Now look back at the second example program. We presented two versions of it. In the version in the left column, the matrix is of type \c MatrixXd which represents matrices of arbitrary size. The version in the right column is similar, except that the matrix is of type \c Matrix3d, which represents matrices of a fixed size (here 3-by-3). Because the type already encodes the size of the matrix, it is not necessary to specify the size in the constructor; compare <tt>MatrixXd m(3,3)</tt> with <tt>Matrix3d m</tt>. Similarly, we have \c VectorXd on the left (arbitrary size) versus \c Vector3d on the right (fixed size). Note that here the coefficients of vector \c v are directly set in the constructor, though the same syntax of the left example could be used too.
./doc/C00_QuickStartGuide.dox:The use of fixed-size matrices and vectors has two advantages. The compiler emits better (faster) code because it knows the size of the matrices and vectors. Specifying the size in the type also allows for more rigorous checking at compile-time. For instance, the compiler will complain if you try to multiply a \c Matrix4d (a 4-by-4 matrix) with a \c Vector3d (a vector of size 3). However, the use of many types increases compilation time and the size of the executable. The size of the matrix may also not be known at compile-time. A rule of thumb is to use fixed-size matrices for size 4-by-4 and smaller.
./doc/C01_TutorialMatrixClass.dox:Vector3d b(5.0, 6.0, 7.0);
./doc/examples/tut_arithmetic_dot_cross.cpp: Vector3d v(1,2,3);
./doc/examples/tut_arithmetic_dot_cross.cpp: Vector3d w(0,1,2);
./doc/examples/tut_arithmetic_add_sub.cpp: Vector3d v(1,2,3);
./doc/examples/tut_arithmetic_add_sub.cpp: Vector3d w(1,0,0);
./doc/examples/tut_arithmetic_scalar_mul_div.cpp: Vector3d v(1,2,3);
./doc/snippets/HouseholderSequence_HouseholderSequence.cpp:Vector3d v0(1, v(1,0), v(2,0));
./doc/snippets/HouseholderSequence_HouseholderSequence.cpp:Vector3d v1(0, 1, v(2,1));
./doc/snippets/HouseholderSequence_HouseholderSequence.cpp:Vector3d v2(0, 0, 1);
./doc/snippets/HouseholderSequence_HouseholderSequence.cpp:Vector3d h = Vector3d::Random();
./doc/snippets/HouseholderSequence_HouseholderSequence.cpp:HouseholderSequence<Matrix3d, Vector3d> hhSeq(v, h);
./doc/snippets/MatrixBase_array.cpp:Vector3d v(1,2,3);
./doc/snippets/MatrixBase_isOrthogonal.cpp:Vector3d v(1,0,0);
./doc/snippets/MatrixBase_isOrthogonal.cpp:Vector3d w(1e-4,0,1);
./doc/snippets/MatrixBase_cwiseSqrt.cpp:Vector3d v(1,2,4);
./doc/snippets/MatrixBase_cwiseMax.cpp:Vector3d v(2,3,4), w(4,2,3);
./doc/snippets/MatrixBase_array_const.cpp:Vector3d v(-1,2,-3);
./doc/snippets/Tridiagonalization_householderCoefficients.cpp:Vector3d hc = triOfA.householderCoefficients();
./doc/snippets/MatrixBase_row.cpp:m.row(1) = Vector3d(4,5,6);
./doc/snippets/MatrixBase_cwiseMin.cpp:Vector3d v(2,3,4), w(4,2,3);
./doc/snippets/MatrixBase_cwiseQuotient.cpp:Vector3d v(2,3,4), w(4,2,3);
./doc/snippets/MatrixBase_col.cpp:m.col(1) = Vector3d(4,5,6);
./doc/snippets/HessenbergDecomposition_packedMatrix.cpp:Vector3d hc = hessOfA.householderCoefficients();
./Eigen/src/Eigen2Support/LeastSquares.h: Vector3d points[5];
./Eigen/src/Eigen2Support/LeastSquares.h: points[0] = Vector3d( 3.02, 6.89, -4.32 );
./Eigen/src/Eigen2Support/LeastSquares.h: points[1] = Vector3d( 2.01, 5.39, -3.79 );
./Eigen/src/Eigen2Support/LeastSquares.h: points[2] = Vector3d( 2.41, 6.01, -4.01 );
./Eigen/src/Eigen2Support/LeastSquares.h: points[3] = Vector3d( 2.09, 5.55, -3.86 );
./Eigen/src/Eigen2Support/LeastSquares.h: points[4] = Vector3d( 2.58, 6.32, -4.10 );
./Eigen/src/Eigen2Support/LeastSquares.h: Vector3d coeffs; // will store the coefficients a, b, c
./unsupported/test/openglsupport.cpp: Quaterniond qd(AngleAxisd(internal::random<double>(), Vector3d::Random()));
./unsupported/test/openglsupport.cpp: Vector2d vd2; vd2.setRandom(); Vector3d vd23; vd23 << vd2, 0;
./unsupported/test/openglsupport.cpp: Vector3d vd3; vd3.setRandom();
./unsupported/test/openglsupport.cpp: Vector2d vd2; vd2.setRandom(); Vector3d vd23; vd23 << vd2, 1;
./unsupported/test/openglsupport.cpp: Vector3d vd3; vd3.setRandom();
./unsupported/test/openglsupport.cpp: typedef Vector3d Vector3d;
./unsupported/test/openglsupport.cpp: VERIFY_UNIFORM(dv,v3d, Vector3d);
./unsupported/test/splines.cpp: Vector3d pt = spline(u(i));
./unsupported/test/splines.cpp: Vector3d pt = spline(u(i));
./test/nullary.cpp: CALL_SUBTEST_6( testVectorType(Vector3d()) );
./test/array_for_matrix.cpp: CALL_SUBTEST_7( lpNorm(Vector3d()) );
./test/commainitializer.cpp: Vector3d vec[3];
./test/unalignedassert.cpp: construct_at_boundary<Vector3d>(4);
./test/linearstructure.cpp: CALL_SUBTEST_3( linearStructure(Vector3d()) );
./test/eigen2/eigen2_array.cpp: CALL_SUBTEST_3( lpNorm(Vector3d()) );
./test/eigen2/eigen2_commainitializer.cpp: Vector3d vec[3];
./test/eigen2/eigen2_linearstructure.cpp: CALL_SUBTEST_3( linearStructure(Vector3d()) );
./test/array_replicate.cpp: CALL_SUBTEST_3( replicate(Vector3d()) );
root@eran-ubuntu: /tmp/eigen-eigen-ca142d0540d3 $
Eran