[Vm-dev] Minheadless trial
btc at openinworld.com
Mon Aug 6 19:57:17 UTC 2018
On 6 August 2018 at 23:54, Ben Coman <btc at openinworld.com> wrote:
> On 6 August 2018 at 13:22, Ben Coman <btc at openinworld.com> wrote:
> > and ends up with 4 link errors (and 6600 warnings)
> > Pharo.exe LNK1120 - 1 unresolved external
> > Pharow.exe LNK1120 - 1unresolved external
> > sqMain.c.obj LNK2019 - unresolved external symbol
> _imp_osvm_main referenced in function main
> > sqWin32Main.c.obj LNK2019 - unresolved external symbol _imp_osvm_main
> referenced in function WinMain
> So the following change to sqMain.c fixes the link error...
> #define BUILD_VM_CORE
> #include "OpenSmalltalkVM.h"
> main(int argc, const char **argv)
> return osvm_main(argc, argv);
> and similar for sqWin32Main.c.
The next roadbump is...
LNK2019 unresolved external symbol 'alloca' referenced in function
callIA32IntegralReturn -- File PharoVMCore.lib(xabicc.c.obj)
>From the root folder, doing...
find . -name xabicc.c
Googling for "alloca Visual Studio 2017" lead me to...
which indicates there is no "alloca" only "_alloca"
Now " xabicc.c" is a stub for including platform specific C code,
and the lovely defines-highlighting of Visual Studio indicates
is the active one right now,
so as a quick hack, jamming a define just above that include...
# include "ia32abicc.c"
# include "ppc32abicc.c"
# if _WIN64
# define alloca _alloca // <<<QUICK HACK
# include "x64win64abicc.c"
# include "x64sysvabicc.c"
# include "arm32abicc.c"
allows CMake > Build All
==> Build succeeded. Yay!
To determine a suitable permanent home for that define, doing...
grep -R " _alloca" *
from the root folder shows...
platforms/Cross/plugins/IA32ABI/arm32abicc.c:# define alloca _alloca
platforms/Cross/plugins/IA32ABI/ia32abicc.c:# define alloca _alloca
platforms/Cross/plugins/IA32ABI/ppc32abicc.c:# define alloca _alloca
platforms/Cross/plugins/SqueakFFIPrims/sqFFIPlugin.c:# define alloca
platforms/unix/config/configure:# define alloca _alloca
platforms/win32/vm/sqPlatformSpecific.h:# define alloca _alloca
processors/ARM/gdb-7.10/include/alloca-conf.h:# define alloca _alloca
processors/IA32/bochs/bx_debug/parser.c:# define alloca _alloca
src/plugins/SqueakFFIPrims/ARM32FFIPlugin.c:# define alloca _alloca
src/plugins/SqueakFFIPrims/IA32FFIPlugin.c:# define alloca _alloca
src/plugins/SqueakFFIPrims/X64SysVFFIPlugin.c:# define alloca _alloca
src/plugins/SqueakFFIPrims/X64Win64FFIPlugin.c:# define alloca _alloca
Interesting that there is a similar define for ia32abicc.c,
so comparing that with x64win64abicc.c (at
looks like it should be slotted into the latter about line 41.
Doing that ==> Build successful.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Vm-dev