[Vm-dev] Minheadless trial

Ben Coman btc at openinworld.com
Mon Aug 6 05:22:55 UTC 2018


On 6 August 2018 at 11:50, Ben Coman <btc at openinworld.com> wrote:
> wow time flies, its been 18 months since Ronie announced his
> Minheadless VM branch...
> [1] http://forum.world.st/Minheadless-VM-flavour-status-update-td4928091.html

In Visual Studio...
> (with x64-Debug & pharo.exe selected)
> I went Cmake > Build All
> ==> 10 Errors, 9 Warnings, which I'll discuss in a followup post.
and btw, the build finishes too quick

Here are the errors...
------------------------
https://github.com/ronsaldo/opensmalltalk-vm/blob/be7b1c03/platforms/minheadless/windows/sqPlatformSpecific-Win32.c#L80
 typedef HRESULT WINAPI (*SetProcessDpiAwarenessFunctionPointer) (int
awareness);
    C2059 sqPlatformSpecific-Win32.c:80 syntax error: '('
    E0651 a calling convention may not be followed by a nested declarator.

The following change reduces build errors to 1...
  typedef HRESULT (*SetProcessDpiAwarenessFunctionPointer) (int awareness);

but I'm not sure of the implications.

Could be "the parenthesis around the function name" [2]
Or "there's already a C standard function [of that name]" [3]
The Microsoft definition returns a BOOL [4].

[2] https://software.intel.com/en-us/forums/intel-c-compiler/topic/385282
[3] https://social.msdn.microsoft.com/Forums/vstudio/en-US/2c57ada8-e1c9-4030-a058-6a7afd2fd29f/a-calling-convention-may-not-be-followed-by-a-nested-declarator?forum=vcgeneral
[4] https://docs.microsoft.com/en-us/windows/desktop/api/winuser/nf-winuser-setprocessdpiawarenesscontext


------------------------
https://github.com/ronsaldo/opensmalltalk-vm/blob/be7b1c03/platforms/minheadless/common/sqWindow-Dispatch.c#L68
  sqInt ioSetCursorARGB(sqInt cursorBitsIndex, sqInt extentX, sqInt
extentY, sqInt offsetX, sqInt offsetY)
    C2371 'ioSetCursorARGB': redefinition; different basic types

where sqInt is "long long".
but the function declaration is
https://github.com/ronsaldo/opensmalltalk-vm/blob/21cc02b6bf/platforms/minheadless/windows/sqPlatformSpecific-Win32.h#L117
  int ioSetCursorARGB(sqInt bitsIndex, sqInt w, sqInt h, sqInt x, sqInt y);

After modifying that function declaration to return 'sqInt',
"Cmake > Build all" runs much longer


------------------------
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

I do see osvm_main is defined here...
https://github.com/ronsaldo/opensmalltalk-vm/blob/be7b1c03/platforms/minheadless/common/sqVirtualMachineInterface.c#L618

but I'm stuck, I don't understand why its looking for "_imp_osvm_main"

I'd be glad if anyone can advise on this, and the two errors above.

cheers -ben


More information about the Vm-dev mailing list