User Tag List

Results 1 to 3 of 3

Thread: [Lua-Socket] Ubuntu 14.04 64 bits(Dynamic librairies)

  1. #1
    Respected Member
    Join Date
    May 2013
    Location
    France
    Posts
    66
    XP
    3,058
    Level
    16
    Thanks
    12
    Thanked 9 Times in 7 Posts

    [Lua-Socket] Ubuntu 14.04 64 bits(Dynamic librairies)

    Hi. Thank to Rotchet2's help, i figured out how make Lua-Socket works with Eluna on Ubuntu 14.04 64 bits. I think it will work on a 32 bits version, but you have to correct paths. (And also dynamic libraries)

    Code:
    $cat /etc/lsb-release
    DISTRIB_ID=Ubuntu
    DISTRIB_RELEASE=14.04
    DISTRIB_CODENAME=trusty
    DISTRIB_DESCRIPTION="Ubuntu 14.04.2 LTS"
    First, you'll have to add this line "#define LUA_USE_LINUX"
    https://github.com/ElunaLuaEngine/El.../luaconf.h#L41

    Of course, you could do it in Cmakelist, you do as you want to do.

    Now we have to link dl lib to your installation of Eluna

    https://github.com/ElunaLuaEngine/El...CMakeLists.txt

    At the the end of the file,

    +set (CMAKE_CXX_LINK_EXECUTABLE "/usr/lib/x86_64-linux-gnu/libdl.so -ldl")
    +target_link_libraries(lualib "dl" "/usr/lib/x86_64-linux-gnu/libdl.so")
    +set_target_properties(lualib PROPERTIES COMPILE_FLAGS "-ldl")

    (Check if paths are correct, if it isn't, fix it.)

    As it is now, you have to compile.
    It worked for me.

    Now about Lua-Socket,

    You have to run

    Code:
    $sudo apt-get install lua-socket
    Now, you have to try it in Eluna :

    Code:
    print("[INFO]: Load Sockets")
    
    package.path = "/usr/share/lua/5.2/?.lua;"..package.path
    package.cpath = "/usr/lib/x86_64-linux-gnu/lua/5.2/?.so"..package.cpath
    
    socket = require("socket")
    print("[DEBUG]: Socket-Version:"..socket._VERSION)
    Be careful with lua-socket, we don't have multi-threading in lua, so you'll have to use coroutines.
    Last edited by miaxos; 09-22-2015 at 10:40 PM.
    Achievements:
    1 year registered Member Level XV

  2. #2
    Emulation Addict
    Join Date
    Dec 2015
    Posts
    4
    XP
    846
    Level
    7
    Thanks
    0
    Thanked 0 Times in 0 Posts
    will this work for all linux?

  3. #3
    Moderator / Eluna Dev <span style='color: #FF0000'><span class='glow_8B0000'>Rochet2</span></span>'s Avatar
    Join Date
    Apr 2013
    Location
    Finland
    Posts
    1,871
    XP
    13,718
    Level
    35
    Thanks
    95
    Thanked 595 Times in 421 Posts
    Quote Originally Posted by nevadies View Post
    will this work for all linux?
    Maybe. You could try.
    Awards:
    Support LOL Scripter Facepalm! Raffle Winner
    rochet2.github.io - Home of great codes

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •