9dc6200d13299dac5778407b18ef4e7af1c06f63 — octaspire 9 months ago 8138bc6 v0.480.0
Build binary library example in MSVC 'how-to-build'-script

* Build binary library example in Windows MSVC
  'how-to-build'-script.

* Enable binary plugins in the MSVC built Dern REPL.
M dev/include/octaspire/dern/octaspire_dern_config.h => dev/include/octaspire/dern/octaspire_dern_config.h +2 -2
@@ 18,8 18,8 @@ limitations under the License.
 #define OCTASPIRE_DERN_CONFIG_H
 
 #define OCTASPIRE_DERN_CONFIG_VERSION_MAJOR "0"
-#define OCTASPIRE_DERN_CONFIG_VERSION_MINOR "479"
-#define OCTASPIRE_DERN_CONFIG_VERSION_PATCH "2"
+#define OCTASPIRE_DERN_CONFIG_VERSION_MINOR "480"
+#define OCTASPIRE_DERN_CONFIG_VERSION_PATCH "0"
 
 #define OCTASPIRE_DERN_CONFIG_VERSION_STR "Octaspire Dern version " \
     OCTASPIRE_DERN_CONFIG_VERSION_MAJOR "." \

M release/examples/mylib.c => release/examples/mylib.c +6 -0
@@ 1,6 1,9 @@
 #include <stdio.h>
 #include "octaspire-dern-amalgamated.c"
 
+#ifdef _MSC_VER
+extern __declspec(dllexport)
+#endif
 octaspire_dern_value_t *mylib_say(
     octaspire_dern_vm_t *vm,
     octaspire_dern_value_t *arguments,


@@ 30,6 33,9 @@ octaspire_dern_value_t *mylib_say(
     return octaspire_dern_vm_create_new_value_boolean(vm, true);
 }
 
+#ifdef _MSC_VER
+extern __declspec(dllexport)
+#endif
 bool mylib_init(octaspire_dern_vm_t * const vm, octaspire_dern_environment_t * const targetEnv)
 {
     octaspire_helpers_verify_true(vm && targetEnv);

M release/how-to-build/windows-msvc.bat => release/how-to-build/windows-msvc.bat +14 -2
@@ 15,10 15,22 @@ cl /nologo /W3 /DOCTASPIRE_DERN_AMALGAMATED_UNIT_TEST_IMPLEMENTATION octaspire-d
 @ECHO -----------------------------------------------------------------
 @ECHO interactive Dern REPL:
 @ECHO -----------------------------------------------------------------
-cl /nologo /W2 /DOCTASPIRE_DERN_AMALGAMATED_REPL_IMPLEMENTATION octaspire-dern-amalgamated.c /link /out:octaspire-dern-repl.exe
+cl /nologo /W2 /DOCTASPIRE_DERN_AMALGAMATED_REPL_IMPLEMENTATION /DOCTASPIRE_DERN_CONFIG_BINARY_PLUGINS octaspire-dern-amalgamated.c /link /out:octaspire-dern-repl.exe
 @ECHO.
 @ECHO RUN WITH:
 @ECHO octaspire-dern-repl.exe
 @ECHO.
 @ECHO BUILD WITH:
-@ECHO cl /W2 /DOCTASPIRE_DERN_AMALGAMATED_REPL_IMPLEMENTATION octaspire-dern-amalgamated.c /link /out:octaspire-dern-repl.exe
+@ECHO cl /W2 /DOCTASPIRE_DERN_AMALGAMATED_REPL_IMPLEMENTATION /DOCTASPIRE_DERN_CONFIG_BINARY_PLUGINS octaspire-dern-amalgamated.c /link /out:octaspire-dern-repl.exe
+
+
+@ECHO -----------------------------------------------------------------
+@ECHO binary library example
+@ECHO -----------------------------------------------------------------
+cl /nologo /W2 /I. /DOCTASPIRE_DERN_AMALGAMATED_IMPLEMENTATION /LD examples\mylib.c /link /out:libmylib.dll
+@ECHO.
+@ECHO RUN WITH:
+@ECHO octaspire-dern-repl.exe examples\use-mylib.dern
+@ECHO.
+@ECHO BUILD WITH:
+@ECHO cl /W2 /I. /DOCTASPIRE_DERN_AMALGAMATED_IMPLEMENTATION /LD examples\mylib.c /link /out:libmylib.dll

M release/octaspire-dern-amalgamated.c => release/octaspire-dern-amalgamated.c +2 -2
@@ 26336,8 26336,8 @@ limitations under the License.
 #define OCTASPIRE_DERN_CONFIG_H
 
 #define OCTASPIRE_DERN_CONFIG_VERSION_MAJOR "0"
-#define OCTASPIRE_DERN_CONFIG_VERSION_MINOR "479"
-#define OCTASPIRE_DERN_CONFIG_VERSION_PATCH "2"
+#define OCTASPIRE_DERN_CONFIG_VERSION_MINOR "480"
+#define OCTASPIRE_DERN_CONFIG_VERSION_PATCH "0"
 
 #define OCTASPIRE_DERN_CONFIG_VERSION_STR "Octaspire Dern version " \
     OCTASPIRE_DERN_CONFIG_VERSION_MAJOR "." \