diff --git a/README.md b/README.md index ce95b63..da2e91e 100644 --- a/README.md +++ b/README.md @@ -1,9 +1,9 @@ # erlsass Compile Sass/Scss implemented as Erlang NIF using libsass. -## Confirmed to work on: +## Known to work on: - Ubuntu 17.10 -- +- Windows 10 x64 (Compile via MinGW gcc) ## API diff --git a/c_src/Makefile b/c_src/Makefile index 75df915..a2ddfb2 100644 --- a/c_src/Makefile +++ b/c_src/Makefile @@ -70,6 +70,7 @@ CXXFLAGS ?= -O3 -finline-functions -Wall CFLAGS += -I "$(ERTS_INCLUDE_DIR)" -I "$(ERL_INTERFACE_INCLUDE_DIR)" -I "libsass/include" -I "libsass" CXXFLAGS += -I "$(ERTS_INCLUDE_DIR)" -I "$(ERL_INTERFACE_INCLUDE_DIR)" -I "libsass/include" "../priv/libsass.dll" + LDLIBS += -L "$(ERL_INTERFACE_LIB_DIR)" -lerl_interface -lei LDFLAGS += -shared diff --git a/src/erlsass.erl b/src/erlsass.erl index 75e2180..cf63243 100644 --- a/src/erlsass.erl +++ b/src/erlsass.erl @@ -56,8 +56,8 @@ init() -> {win32, _Osname} -> Path = os:getenv("PATH"), os:putenv("PATH", Path ++ PrivDir ++ ";") - end, - + end, + SharedLib = filename:join(PrivDir, ?LIBNAME), erlang:load_nif(SharedLib, 0).