-
Notifications
You must be signed in to change notification settings - Fork 77
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Module can't be loaded on Windows #29
Comments
Yeah, It turned out that you can't load nif modules using shell. It will give you this error that I was seeing:
When using properly, the compiled module will work. Build steps: I think everything works now, though I haven't tested anything expect loading. |
Then it is probably a path setting which is wrong. Unfortunately I don't have a windows box close by, so it is a bit hard to look into for me right now. |
Same problem here. When i try to compile it with mix i get the following error message
Maybe this additional informations from another user can help |
It means that you have not setup your ms toolchain correctly. This might help you fix this: https://msdn.microsoft.com/en-us/library/f2ccy3wt(v=VS.90).aspx |
Ran into the exact same problems. Would be good to have some hints in the README about this issue, and how to get sqlite working in Windows. |
Good idea. |
Solved this issue with the below steps from the command line type mix local.rebar then goto C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC vcvarsall.bat amd64(type this at the end in the command line) and press enter go back to your project folder and type "mix" Now esqlite get compiled |
I'm not sure if I completely got how you solved it. Do you mean that the compilation itself is fine, but the the way the compiled module is loaded is wrong? I wonder what you did to fix the loading. I'm trying to use sqlite in my Phoenix project with https://github.com/Sqlite-Ecto/sqlite_ecto2. The project works fine on Linux or Mac but when I try to compile it on Windows I get the same error.
Versions:
Is it the case that specifically the "amd64" version of the compiler will have to be used? Or is it just something specific to each system. |
That is an error message of the C compiler. From what I remember from my windows dev days is that you have to run a bat files named like "vscvars.bat" or something similar. It will put the location of the standard include files in your environment. |
I mean I was able to compile it after running that .bat file. It's only
when I try to launch my Elixir app the problem occurs. I think it was also
what the OP encountered. I'm just not sure how he solved it in the end.
…On Wed, Dec 12, 2018, 16:01 Maas-Maarten Zeeman ***@***.*** wrote:
That is an error message of the C compiler.
From what I remember from my windows dev days is that you have to run a
bat files named like "vscvars.bat" or something similar. It will put the
location of the standard include files in your environment.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#29 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AC3DqdvuhLpeE6nDuwhBXnT2quXhKEewks5u4RpagaJpZM4GVORH>
.
|
@x-ji: How did you build the esqlite? Can't remember exactly what I did back then but from my last comment it seems that I did following things:
After these steps esqlite was compiled successfully and I could load it in iex. |
I'm having trouble getting esqlite to compile on Windows 10
I get two different error messages depending on how I try to compile it.
Either
Or
This started when I created a new phoenix app using sqlite as a database.
but that failed since compiling esqlite failed. Compiler cl.exe was not found in path but luckily I had Visual Studio installed on my computer so I just added the bin-folder to path. After trying again to compile esqlite using
mix deps.compile esqlite
it failed again. This time it couldn't find some files if I remember right. I installed proper rebar and added that to my path. Again tried to compile and it still failed. Then I started developer command prompt for visual studio and tried to compile esqlite again. This time it worked.
But loading the module will fail with unspecified error or not matching calling module 'erl_eval'.
I tried with following combinations:
cl.exe from C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin
cl.exe from C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin\amd64_x86
cl.exe from C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin\x86_amd64
and several VS2015 * tools command prompts
Compiling esqlite will give lots of warnings but it will always compile. The module just can't be loaded.
I'm using
Erlang/OTP 18 [erts-7.0] [64-bit] [smp:12:12] [async-threads:10]
Eshell V7.0 (abort with ^G)
esqlite 0.2.1
Windows 10 64bit ENG
Visual Studio 2015
The text was updated successfully, but these errors were encountered: