blueloveTH 1 ano atrás
pai
commit
2742414fa7
2 arquivos alterados com 3 adições e 3 exclusões
  1. 2 2
      build_dll.sh
  2. 1 1
      src/public/internal.c

+ 2 - 2
build_dll.sh

@@ -2,5 +2,5 @@ set -e
 
 FLAGS="-std=c11 -Iinclude -O0 -Wfatal-errors -g -DDEBUG -DPK_ENABLE_OS=1"
 
-clang $FLAGS -shared -fPIC src2/hello.c -o libhello.dylib -undefined dynamic_lookup
-
+# link libpocketpy.dylib
+clang $FLAGS -shared -fPIC src2/hello.c -o libhello.dylib -L. -lpocketpy

+ 1 - 1
src/public/internal.c

@@ -20,7 +20,7 @@ static VM pk_default_vm;
 static VM* pk_all_vm[16];
 
 void py_initialize() {
-    if(!pk_current_vm){
+    if(pk_current_vm){
         c11__abort("py_initialize() can only be called once!");
     }