For some reason, I have to use gcc to compile a C file, and then a link to a Visual C ++ 2008 project.
(I used the latest version of gcc: cygwin gcc 4.3.4 20090804.)
But there is one problem: gcc always allocates a large array with _alloca,
and the VC linker cannot resolve the __alloca character.
eg,
int func()
{
int big[10240];
....
}
this code calls the _alloca dependency, although I did not call the _alloca function explicitly.
(the size of the array matters. if I change 10240 -> 128, everything is fine)
I tried the gcc option -fno-builtin-alloca or -fno-builtin, but no luck.
Can gcc be used to use _alloca? (or adjust the threshold?)
shkim source
share