diff --git a/build_dll.sh b/build_dll.sh index 0c3110b5..772a07fe 100644 --- a/build_dll.sh +++ b/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 diff --git a/src/public/internal.c b/src/public/internal.c index 49e1f305..94efb519 100644 --- a/src/public/internal.c +++ b/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!"); }