简体   繁体   中英

symbol lookup error: undefined symbol: _alloca

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!

_alloca is used by the Visual C++ compiler on Windows. You need to use alloca (without the underscore) for compiling on Linux.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM