Giter Site home page Giter Site logo

time.time()得到负值 about bee.lua HOT 7 CLOSED

actboy168 avatar actboy168 commented on June 2, 2024
time.time()得到负值

from bee.lua.

Comments (7)

luciouskami avatar luciouskami commented on June 2, 2024

luamake也是调用的msbuild编译,在各项条件都相同的情况下,如果你使用visual studio编译,那么与使用luamake编译得到的结果应该是一致的。

from bee.lua.

actboy168 avatar actboy168 commented on June 2, 2024

@luciouskami luamake是直接用cl不经过msbuild

from bee.lua.

actboy168 avatar actboy168 commented on June 2, 2024

@tonyzzp 请用最新的版本。旧版本不会再维护了。

from bee.lua.

tonyzzp avatar tonyzzp commented on June 2, 2024

因为一些原因,需要使用lua5.1

编译的时候有这2个警告,我怀疑就是这个问题。

3rd/bee.lua/binding/lua_time.cpp(36): warning C4244: “参数”: 从“uint64_t”转换到“lua_Integer”,可能丢失数据
3rd/bee.lua/binding/lua_time.cpp(40): warning C4244: “参数”: 从“uint64_t”转换到“lua_Integer”,可能丢失数据

from bee.lua.

tonyzzp avatar tonyzzp commented on June 2, 2024

vcruntime.h里有这一段定义

#ifdef _WIN64
typedef unsigned __int64 size_t;
typedef __int64 ptrdiff_t;
typedef __int64 intptr_t;
#else
typedef unsigned int size_t;
typedef int ptrdiff_t;
typedef int intptr_t;
#endif

好像 lua_Integer 被定义为了int,也许不行?
我尝试添加_WIN64,但编译会有很多报错。

from bee.lua.

actboy168 avatar actboy168 commented on June 2, 2024

lua5.1的int只有32位,你需要一个int64的patch或者library。亦或者把GetTickCount64改成GetTickCount

from bee.lua.

tonyzzp avatar tonyzzp commented on June 2, 2024

我知道怎么回事了。 arch改成 x86_64就好了 。原来写的是x64。

from bee.lua.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.