1

I'm building a shared object (.so) that internally makes use of a function _alloca() (defined in malloc.h). This .so compiles smoothly. But as soon as I call a function that makes use of _alloca(), my application crashes whith a console output

symbol lookup error: undefined symbol: _alloca

So: any idea against what library I have to link during build to get this external reference resolved?

Platform is CentOS7 x64

Thanks!

4

1 回答 1

2

_alloca由 Windows 上的 Visual C++ 编译器使用。您需要使用alloca(不带下划线)在 Linux 上进行编译。

于 2016-08-30T13:06:32.050 回答