<div dir="ltr">Hi,<div>I am trying to test Eigen with RTEMS which is a very efficient library in c++ for matrix computations. I wrote the following program:</div><div><br></div><div><div>/*</div><div> *  Classic API Eigen</div><div> */</div><div><br></div><div>#include <rtems.h> //Contains the RTEMS datatypes</div><div>#include <stdlib.h>//Standard C library</div><div>#include <stdio.h>//Standard C input ouput library</div><div>#include <iostream></div><div>#include "Eigen/Dense" //Eigen library</div><div>using namespace std;</div><div>using Eigen::MatrixXd;</div><div><br></div><div>rtems_task Init(</div><div>  rtems_task_argument ignored</div><div>)</div><div>{</div><div><span class="" style="white-space:pre">  </span>MatrixXd m(2,2);</div><div>  m(0,0) = 3;</div><div>  m(1,0) = 2.5;</div><div>  m(0,1) = -1;</div><div>  m(1,1) = m(1,0) + m(0,1);</div><div>  std::cout << m << std::endl;</div><div>  exit( 0 );</div><div>}</div><div><br></div><div>/* configuration information */</div><div><br></div><div>#include <bsp.h></div><div><br></div><div>/* NOTICE: the clock driver is explicitly disabled */</div><div>#define CONFIGURE_APPLICATION_DOES_NOT_NEED_CLOCK_DRIVER</div><div>#define CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER</div><div>#define CONFIGURE_USE_DEVFS_AS_BASE_FILESYSTEM</div><div><br></div><div>#define CONFIGURE_RTEMS_INIT_TASKS_TABLE</div><div>#define CONFIGURE_MAXIMUM_TASKS 1</div><div>#define CONFIGURE_MAXIMUM_SEMAPHORES 1</div><div><br></div><div>#define CONFIGURE_INIT</div><div>#include <rtems/confdefs.h></div><div>/* end of file */</div></div><div><br></div><div>For this to run I need to include the file /home/sambeet/NewRockPort/x86/Install/eigen/include/eigen2 </div><div><br></div><div>So I made the following changes to the makefile of example-v2/cxx/cxx_throw (in bold)</div><div><br></div><div><div>#</div><div>#  Makefile</div><div>#</div><div><br></div><div>#</div><div>#  RTEMS_MAKEFILE_PATH is typically set in an environment variable</div><div>#</div><div><br></div><div>EXEC=eigen.exe</div><div>PGM=${ARCH}/$(EXEC)</div><div><br></div><div># optional managers required</div><div>MANAGERS=all</div><div><br></div><div># C source names</div><div>CSRCS = </div><div>COBJS_ = $(CSRCS:.c=.o)</div><div>COBJS = $(COBJS_:%=${ARCH}/%)</div><div><br></div><div># C++ source names</div><div>CXXSRCS = eigen.cc</div><div>CXXOBJS_ = $(CXXSRCS:.cc=.o)</div><div>CXXOBJS = $(CXXOBJS_:%=${ARCH}/%)</div><div><b>CXXFLAGS = -I/home/sambeet/NewRockPort/x86/Install/eigen/include/eigen2</b></div><div><br></div><div><br></div><div># AS source names</div><div>ASSRCS =</div><div>ASOBJS_ = $(ASSRCS:.s=.o)</div><div>ASOBJS = $(ASOBJS_:%=${ARCH}/%)</div><div><br></div><div># Libraries</div><div>LIBS =</div><div><br></div><div>include $(RTEMS_MAKEFILE_PATH)/Makefile.inc</div><div><br></div><div>include $(RTEMS_CUSTOM)</div><div>include $(PROJECT_ROOT)/make/leaf.cfg</div><div><br></div><div>OBJS= $(COBJS) $(CXXOBJS) $(ASOBJS)</div><div><br></div><div>all:    ${ARCH} $(PGM)</div><div><br></div><div>$(PGM): $(OBJS)</div><div><span class="" style="white-space:pre">     </span>$(make-cxx-exe)</div></div><div><br></div><div><br></div><div>Eigen does not require the inclusion of any separate library, just including the above file will suffice. This is the natural way of appending flags in the makefile but it is not working in this case and I get the following error:</div><div><br></div><div><div>sambeet@Holmes ~/NewRockPort/x86/Build/Rock-Port_ana/Tests/Eigen $ make all</div><div>test -d o-optimize || mkdir o-optimize</div><div>i386-rtems4.11-g++ -B/home/sambeet/NewRockPort/x86/Install/rtems/4.11.0-rc3/i386-rtems4.11/pc386/lib/ -specs bsp_specs -qrtems   -Wall  -O2 -g    -mtune=i386       -c   -o o-optimize/eigen.o eigen.cc</div><div>eigen.cc:9:39: fatal error: Eigen/Dense: No such file or directory</div><div> #include "Eigen/Dense" //Eigen library</div><div>                                       ^</div><div>compilation terminated.</div><div>make: *** [o-optimize/eigen.o] Error 1</div></div><div><br></div><div>How can I resolve this error and include the eigen file?</div><div><br></div></div>