Opened 4 years ago

Closed 4 years ago

#49 closed installation issue (fixed)

Problem in compiling qpOASES on OS X with Matlab 2012b

Reported by: traversaro Owned by: ferreau
Priority: normal Milestone:
Component: Matlab interface Version: 3.1.0
Keywords: Cc:


Due a problem of missing typedef's used by Matlab headers, qpOASES is not compiling on OS X with Matlab 2012b.

There is an easy workaround consisting in including the typeinfo header before including matlab headers (fix described in , implemented in ).

I don't know which Matlab version/operating systems combination you are supporting, anyhow I was wondering if you are interested in including such a patch in upstream qpOASES?

Change History (5)

comment:1 Changed 4 years ago by ferreau

  • Status changed from new to assigned

Thanks a lot for reporting this issue and pointing to an easy work-around. I have already put your modification into the current development trunk, though I commented out the #include <typeinfo> line. This is because I am not familiar with the typeinfo header and I do not know whether it is available on all platforms/Matlab versions. Do you know more about this?

comment:2 Changed 4 years ago by traversaro

typeinfo is a standard header available in C++98. [1]
It is available in Visual Studio since at least the 2010 version [2],
while on GCC and Clang standard library it is available since more then 10 years.

It exports C++ RTTI functions that are not related at all with Matlab, but its effectiveness in
solving the fact that the mex interfaces uses the char16_t even if it is not define is explained in this stack overflow answer : .

[1] :
[2] :
[3] :

comment:3 Changed 4 years ago by traversaro

Notice that given that this is an OS X specific workaround, you can wrap the inclusion with an appropriate preprocessor check:

#ifdef __APPLE__
#include <typeinfo>

comment:4 Changed 4 years ago by ferreau

Thanks again for the additional information. I have just made the typeinfo header be included by default on OS X platforms as you suggested. It part of the trunk from revision 194.

comment:5 Changed 4 years ago by ferreau

  • Resolution set to fixed
  • Status changed from assigned to closed
Note: See TracTickets for help on using tickets.