<p></p>
<p>I'm amazed to not find the IMPORT/EXPORT directives in sqVirtualMachine.h</p>
<p>IMO, the right solution is already sketched in minheadless:</p>
<pre><code>$ grep -r VM_FUNCTION_EXPORT platforms/
platforms/minheadless/windows/sqPlatformSpecific-Win32.h:#    undef VM_FUNCTION_EXPORT
platforms/minheadless/windows/sqPlatformSpecific-Win32.h:#    define VM_FUNCTION_EXPORT(returnType) __declspec( dllexport ) returnType
platforms/minheadless/windows/sqPlatformSpecific-Win32.h:#    undef VM_FUNCTION_EXPORT
platforms/minheadless/windows/sqPlatformSpecific-Win32.h:#    define VM_FUNCTION_EXPORT(returnType) __declspec( dllimport ) returnType
</code></pre>
<p>The relevant section is:</p>
<pre><code>#  if defined(BUILD_VM_CORE) && !defined(VM_CORE_STATIC)
#    undef VM_FUNCTION_EXPORT
#    define VM_FUNCTION_EXPORT(returnType) __declspec( dllexport ) returnType
#  else
#    undef VM_FUNCTION_EXPORT
#    define VM_FUNCTION_EXPORT(returnType) __declspec( dllimport ) returnType
#  endif
#
</code></pre>
<p>then we would just have to declare <code>VM_FUNCTION_EXPORT(some_return_type) some_foo_func( some_arg_type );</code> in sqVirtualMachine.h.<br>
then at compile time, we just use <code>-DBUILD_VM_CORE</code> for compiling the VM, but omit it for compiling external plugins.<br>
Or maybe we can just use <code>#if !defined(SQUEAK_BUILTIN_PLUGIN)</code> in the platform specific file, instead of  if defined(BUILD_VM_CORE) && !defined(VM_CORE_STATIC)</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/commit/aafcb78371c7e576073a8dbf2f1f32667568e05e#commitcomment-49821048">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AIJPEW5B7HWPZ65JKNYJ2M3TJ44R5ANCNFSM43LEE2OA">unsubscribe</a>.<img src="https://github.com/notifications/beacon/AIJPEWYVD5YT7V7KSMSER3DTJ44R5A5CNFSM43LEE2OKYY3PNVWWK3TUL52HS4DFVVBW63LNNF2EG33NNVSW45FKMNXW23LFNZ2F62LEZYBPQNLY.gif" height="1" width="1" alt="" /></p>
<script type="application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/OpenSmalltalk/opensmalltalk-vm/commit/aafcb78371c7e576073a8dbf2f1f32667568e05e#commitcomment-49821048",
"url": "https://github.com/OpenSmalltalk/opensmalltalk-vm/commit/aafcb78371c7e576073a8dbf2f1f32667568e05e#commitcomment-49821048",
"name": "View Commit"
},
"description": "View this Commit on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>