gpt4 book ai didi

c - mex 无法识别内联

转载 作者:太空狗 更新时间:2023-10-29 15:58:52 24 4
gpt4 key购买 nike

我正在尝试编译 a matlab wrapper for libdc1394这是一个用于火线相机的库。我收到一个奇怪的错误,涉及头文件中的一些内联函数。我正在使用 gcc-4.6 开发 ubuntu 12.04。我已经成功编译了其他 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

有什么想法吗?

最佳答案

嗯,Simons 的提议是正确的。我唯一不知道的是你不能直接将 cflags 给 mex。您必须更改 mexopts.sh 文件。我还必须删除 -ansi 标志,因为它与 c99 相矛盾。

关于c - mex 无法识别内联,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15027525/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com