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!

Elmi
  • 5,899
  • 15
  • 72
  • 143

1 Answers1

2

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

tversteeg
  • 4,717
  • 10
  • 42
  • 77