我试图编译为libdc1394一个matlab包装这是FireWire相机库。 我得到包括在头文件中的一些内联函数一个奇怪的错误。 我工作在Ubuntu 12.04使用gcc-4.6。 我编译其它MEX文件成功。 此包装也很难在Mac编译。
/usr/local/MATLAB/R2012b//bin/mex dc1394mex.c `pkg-config --libs --cflags libdc1394-2` -o dc1394.mexa64
Warning: You are using gcc version "4.6.3-1ubuntu5)". The version
currently supported with MEX is "4.4.6".
For a list of currently supported compilers see:
http://www.mathworks.com/support/compilers/current_release/
In file included from /usr/include/dc1394/dc1394.h:53:0,
from dc1394mex.c:23:
/usr/include/dc1394/register.h:47:1: error: unknown type name ‘inline’
/usr/include/dc1394/register.h:47:29: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘dc1394_get_register’
/usr/include/dc1394/register.h:62:1: error: unknown type name ‘inline’
/usr/include/dc1394/register.h:62:29: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘dc1394_set_register’
/usr/include/dc1394/register.h:82:1: error: unknown type name ‘inline’
/usr/include/dc1394/register.h:82:29: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘dc1394_get_control_register’
/usr/include/dc1394/register.h:97:1: error: unknown type name ‘inline’
/usr/include/dc1394/register.h:97:29: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘dc1394_set_control_register’
/usr/include/dc1394/register.h:117:1: error: unknown type name ‘inline’
/usr/include/dc1394/register.h:118:1: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘dc1394_get_adv_control_register’
/usr/include/dc1394/register.h:133:1: error: unknown type name ‘inline’
/usr/include/dc1394/register.h:134:1: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘dc1394_set_adv_control_register’
dc1394mex.c: In function ‘command_init_camera’:
dc1394mex.c:133:12: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
dc1394mex.c:152:12: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
dc1394mex.c: In function ‘dcframe_to_mxframe’:
dc1394mex.c:571:1: error: expected expression before ‘/’ token
dc1394mex.c:572:1: error: expected expression before ‘/’ token
dc1394mex.c:573:1: error: expected expression before ‘/’ token
mex: compile of ' "dc1394mex.c"' failed.
make: *** [dc1394.mexa64] Error 1
有任何想法吗?