Skip to content
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

Build lua-ev on Windows #19

Closed
ahmpro opened this issue Aug 23, 2015 · 3 comments
Closed

Build lua-ev on Windows #19

ahmpro opened this issue Aug 23, 2015 · 3 comments

Comments

@ahmpro
Copy link

ahmpro commented Aug 23, 2015

Hello! Could someone explain me how to build lua-ev on windows?
I have tried to build libev manually but it failed. I have tried to find compliled library on the internet but it failed again.

luarocks config.lua

rocks_trees = {
    { name = [[user]],
         root    = home..[[/luarocks]],
    },
    { name = [[system]],
         root    = [[C:\Program Files (x86)\LuaRocks\systree]],
    },
}
variables = {
    MSVCRT = 'MSVCR80',
    LUALIB = [[lib\lua5.1.lib]],
    CFLAGS = '"-IC:\\Program Files (x86)\\Microsoft Visual Studio 12.0\\VC\\include" "-IC:\\MinGW\\building\\libev-4.20"',
    CMAKE = '"C:\\Program Files (x86)\\CMake\\bin\\cmake.exe"'
}
verbose = true   -- set to 'true' to enable verbose output

luarocks install lua-ev (verbose=false)

C:\>luarocksw install lua-ev
executing: luarocks install lua-ev
Installing https://luarocks.org/lua-ev-v1.4-1.rockspec...
Using https://luarocks.org/lua-ev-v1.4-1.rockspec... switching to 'build' mode
Cloning into 'lua-ev'...
remote: Counting objects: 35, done.
remote: Compressing objects: 100% (31/31), done.
remote: Total 35 (delta 5), reused 17 (delta 0), pack-reused 0 eceiving objects:  85% (30/35)
Receiving objects: 100% (35/35), 30.06 KiB, done.
Resolving deltas: 100% (5/5), done.
Note: checking out '458165bdfe0c6eadc788813925f11a0e6a823845'.

You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by performing another checkout.

If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -b with the checkout command again. Example:

  git checkout -b new_branch_name

cl "-IC:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\include" "-IC:\MinGW\building\libev-4.20" -c -Folua_ev.obj -IC:/Program Files (x86)/Lua/5.1/include/ lua_ev.c
Microsoft (R) C/C++ Optimizing Compiler Version 18.00.21005.1 for x86
Copyright (C) Microsoft Corporation.  All rights reserved.

lua_ev.c
C:\MinGW\building\libev-4.20\ev.h(931) : warning C4005: 'SIGABRT' : macro redefinition
        C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\include\signal.h(43) : see previous definition of 'SIGABRT'
C:\MinGW\building\libev-4.20\ev.h(996) : warning C4005: 'NSIG' : macro redefinition
        C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\include\signal.h(32) : see previous definition of 'NSIG'
link -dll -def:ev.def -out:ev.dll C:/Program Files (x86)/Lua/5.1/lib\lua5.1.lib lua_ev.obj ev.lib
Microsoft (R) Incremental Linker Version 12.00.21005.1
Copyright (C) Microsoft Corporation.  All rights reserved.

LINK : fatal error LNK1181: cannot open input file 'ev.lib'

Error: Build error: Failed compiling module ev.dll
Press any key to continue . . .
@brimworks
Copy link
Owner

I don't think it will build on Windows. I would suggest using the excellent libev + luv binding to Lua:

https://github.com/luvit/luv

This lua-ev binding is just in maintenance mode, and I would advocate using luv instead (especially if you want support for Windows).

Cheers,
-Brian

@ahmpro
Copy link
Author

ahmpro commented Aug 24, 2015

Thanks! I built luv successful.
But i need websockets and don't find any modules which depends on luv.
Now i am trying to use lluv and lua-websockets-lluv.

@Zamiell
Copy link

Zamiell commented Jul 4, 2016

@ahmpro,

I too want to work with websockets with Lua on Windows. Were you able to get lua-websockets-lluv up and running? I have been having some difficulties with compilng luv, the underlying event library. =(

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants