0

I am trying to mex a cpp file which needs eigen, ceres-solver and glog libraries. This is the command I used:

    mex ceresRigidError.cpp /usr/local/lib/libceres.a...
    /usr/lib/x86_64-linux-gnu/libglog.so /usr/include/eigen3/Eigen

It displays Unknown file extension '', but I have no idea where is wrong.

Actually my input is in one single line, I put "..." just for you to view the full code more conveniently without scrolling right.

My actual input:

    mex ceresRigidError.cpp /usr/local/lib/libceres.a /usr/lib/x86_64-linux-gnu/libglog.so /usr/include/eigen3/Eigen
benkyou
  • 45
  • 9
  • Are you sure about the `.a...`? Could you try without the `...` and write everything in a single line? (it's been a while that I used matlab) – chtz Aug 04 '17 at 13:27
  • @chtz The `...` should be fine. `...` means that the command continues to the next line. However, you are right with the single line. My guess is that when the OP continues to the next line, the additional spacing before the library specifications is what is generating that error. The solution would be to type out that entire command without any unnecessary spacing - all in one line. – rayryeng Aug 04 '17 at 17:22
  • Accidentally stumbled upon this question again. It looks like mex assumes that the last parameter is a compilable or linkable file (which it is not). I guess you should replace `/usr/include/eigen3/Eigen` by `-I/usr/include/eigen3` (and maybe it must come before the other arguments -- not sure how strict mex is). – chtz Aug 21 '17 at 16:29

0 Answers0