<p>Hi Ben,</p>
<p>On a quick glance, some of these changes are still required, particularly the FPU one, probably the alloca one.</p>
<p>Other changes, such as the #define BUILD_VM_CORE is actually wrong. The minheadless builds the VM itself in a separate library (currently a static library) that can actually be embedded in any application. The public interface for this library is in include/OpenSmalltalkVM.h The problem in windows here was that BUILD_OSVM_STATIC in a previous version was BUILD_SQUEAK_STATIC . After a commentary from <a class="user-mention" data-hovercard-type="user" data-hovercard-url="/hovercards?user_id=513630" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/estebanlm">@estebanlm</a> I changed the squeak_ prefix for the osvm_ in this public interface.</p>
<p>The public interface file is intended as an stable standalone interface to the vm. So, dependencies on sq.h or similar should not be allowed in this file (In my opinion). The implementation for this interface is in platforms/minheadless/common/sqVirtualMachineInterface.c . This header should be something that an user can copy to /usr/include . osvm_main can be used as an example on how to embed the VM in an application:</p>
<blockquote>
<p>OSVM_VM_CORE_PUBLIC OSVMError<br>
osvm_main(int argc, const char **argv)<br>
{<br>
OSVMError error;</p>
<pre><code>/* Global initialization */
error = osvm_initialize();
if(error)
    return error;

/* Parse the command line*/
error = osvm_parseCommandLineArguments(argc, argv);
if(error)
    return error;

/* Initialize the VM */
error = osvm_initializeVM();
if(error)
    return error;

/* Load the command line image or the default one. */
error = osvm_loadDefaultImage();
if(error)
    return error;

/* Run Squeak */
error = osvm_run();

/* Shutdown*/
osvm_shutdown();

return error;
</code></pre>
<p>}</p>
</blockquote>
<p>A part of the better 32 bits detection and configuration should also be integrated. When I started the minheadless VM two years ago, there was no stable win64 version of the VM.</p>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />You are receiving this because you are subscribed to this thread.<br />Reply to this email directly, <a href="https://github.com/OpenSmalltalk/opensmalltalk-vm/pull/312#issuecomment-443397814">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AhLyW8NrVrzUtuavn1xbMCWmUenoJSfkks5u0gFSgaJpZM4Y8rne">mute the thread</a>.<img src="https://github.com/notifications/beacon/AhLyW6l9XQNmqsofR2LKFI8vULvFBeWeks5u0gFSgaJpZM4Y8rne.gif" height="1" width="1" alt="" /></p>
<script type="application/json" data-scope="inboxmarkup">{"api_version":"1.0","publisher":{"api_key":"05dde50f1d1a384dd78767c55493e4bb","name":"GitHub"},"entity":{"external_key":"github/OpenSmalltalk/opensmalltalk-vm","title":"OpenSmalltalk/opensmalltalk-vm","subtitle":"GitHub repository","main_image_url":"https://assets-cdn.github.com/images/email/message_cards/header.png","avatar_image_url":"https://assets-cdn.github.com/images/email/message_cards/avatar.png","action":{"name":"Open in GitHub","url":"https://github.com/OpenSmalltalk/opensmalltalk-vm"}},"updates":{"snippets":[{"icon":"PERSON","message":"@ronsaldo in #312: Hi Ben,\r\n\r\nOn a quick glance, some of these changes are still required, particularly the FPU one, probably the alloca one.\r\n\r\nOther changes, such as the #define BUILD_VM_CORE is actually wrong. The minheadless builds the VM itself in a separate library (currently a static library) that can actually be embedded in any application. The public interface for this library is in include/OpenSmalltalkVM.h The problem in windows here was that BUILD_OSVM_STATIC in a previous version was BUILD_SQUEAK_STATIC . After a commentary from @estebanlm I changed the squeak_ prefix for the osvm_ in this public interface.\r\n\r\nThe public interface file is intended as an stable standalone interface to the vm. So, dependencies on sq.h or similar should not be allowed in this file (In my opinion). The implementation for this interface is in platforms/minheadless/common/sqVirtualMachineInterface.c . This header should be something that an user can copy to /usr/include . osvm_main can be used as an example on how to embed the VM in an application:\r\n\r\n\u003e OSVM_VM_CORE_PUBLIC OSVMError\r\n\u003e osvm_main(int argc, const char **argv)\r\n\u003e {\r\n\u003e     OSVMError error;\r\n\u003e \r\n\u003e     /* Global initialization */\r\n\u003e     error = osvm_initialize();\r\n\u003e     if(error)\r\n\u003e         return error;\r\n\u003e \r\n\u003e     /* Parse the command line*/\r\n\u003e     error = osvm_parseCommandLineArguments(argc, argv);\r\n\u003e     if(error)\r\n\u003e         return error;\r\n\u003e \r\n\u003e     /* Initialize the VM */\r\n\u003e     error = osvm_initializeVM();\r\n\u003e     if(error)\r\n\u003e         return error;\r\n\u003e \r\n\u003e     /* Load the command line image or the default one. */\r\n\u003e     error = osvm_loadDefaultImage();\r\n\u003e     if(error)\r\n\u003e         return error;\r\n\u003e \r\n\u003e     /* Run Squeak */\r\n\u003e     error = osvm_run();\r\n\u003e \r\n\u003e     /* Shutdown*/\r\n\u003e     osvm_shutdown();\r\n\u003e \r\n\u003e     return error;\r\n\u003e }\r\n\r\nA part of the better 32 bits detection and configuration should also be integrated. When I started the minheadless VM two years ago, there was no stable win64 version of the VM.\r\n"}],"action":{"name":"View Pull Request","url":"https://github.com/OpenSmalltalk/opensmalltalk-vm/pull/312#issuecomment-443397814"}}}</script>
<script type="application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/OpenSmalltalk/opensmalltalk-vm/pull/312#issuecomment-443397814",
"url": "https://github.com/OpenSmalltalk/opensmalltalk-vm/pull/312#issuecomment-443397814",
"name": "View Pull Request"
},
"description": "View this Pull Request on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
},
{
"@type": "MessageCard",
"@context": "http://schema.org/extensions",
"hideOriginalBody": "false",
"originator": "AF6C5A86-E920-430C-9C59-A73278B5EFEB",
"title": "Re: [OpenSmalltalk/opensmalltalk-vm] DO NOT INTEGRATE - FOR DISCUSSION ONLY Minimalistic headless x64 msvc2017 (#312)",
"sections": [
{
"text": "",
"activityTitle": "**Ronie Salgado**",
"activityImage": "https://assets-cdn.github.com/images/email/message_cards/avatar.png",
"activitySubtitle": "@ronsaldo",
"facts": [

]
}
],
"potentialAction": [
{
"name": "Add a comment",
"@type": "ActionCard",
"inputs": [
{
"isMultiLine": true,
"@type": "TextInput",
"id": "IssueComment",
"isRequired": false
}
],
"actions": [
{
"name": "Comment",
"@type": "HttpPOST",
"target": "https://api.github.com",
"body": "{\n\"commandName\": \"IssueComment\",\n\"repositoryFullName\": \"OpenSmalltalk/opensmalltalk-vm\",\n\"issueId\": 312,\n\"IssueComment\": \"{{IssueComment.value}}\"\n}"
}
]
},
{
"name": "Close pull request",
"@type": "HttpPOST",
"target": "https://api.github.com",
"body": "{\n\"commandName\": \"PullRequestClose\",\n\"repositoryFullName\": \"OpenSmalltalk/opensmalltalk-vm\",\n\"pullRequestId\": 312\n}"
},
{
"targets": [
{
"os": "default",
"uri": "https://github.com/OpenSmalltalk/opensmalltalk-vm/pull/312#issuecomment-443397814"
}
],
"@type": "OpenUri",
"name": "View on GitHub"
},
{
"name": "Unsubscribe",
"@type": "HttpPOST",
"target": "https://api.github.com",
"body": "{\n\"commandName\": \"MuteNotification\",\n\"threadId\": 418560478\n}"
}
],
"themeColor": "26292E"
}
]</script>