L和xD6;VE2D-0.9.1和LuaJIT-2.0.3:&xB4;打印()´;不';不要写入控制台

L和xD6;VE2D-0.9.1和LuaJIT-2.0.3:&xB4;打印()´;不';不要写入控制台,lua,luajit,love2d,Lua,Luajit,Love2d,重要提示: 我在Love2D论坛上问。事实证明0.9.1版已经使用了LuaJIT,所以不需要将任何Lua51.dll交换为“启用”LuaJIT。所以问题就解决了 我试图在load函数中打印一些内容,但是控制台窗口中没有显示任何内容 conf.lua: function love.conf(t) t.modules.audio = true -- Enable the audio module (boolean) t.modules.event = tru

重要提示: 我在Love2D论坛上问。事实证明0.9.1版已经使用了LuaJIT,所以不需要将任何Lua51.dll交换为“启用”LuaJIT。所以问题就解决了


我试图在load函数中打印一些内容,但是控制台窗口中没有显示任何内容

conf.lua:

function love.conf(t)
    t.modules.audio = true             -- Enable the audio module (boolean)
    t.modules.event = true             -- Enable the event module (boolean)
    t.modules.graphics = true          -- Enable the graphics module (boolean)
    t.modules.image = true             -- Enable the image module (boolean)
    t.modules.joystick = true          -- Enable the joystick module (boolean)
    t.modules.keyboard = true          -- Enable the keyboard module (boolean)
    t.modules.math = true              -- Enable the math module (boolean)
    t.modules.mouse = true             -- Enable the mouse module (boolean)
    t.modules.physics = true           -- Enable the physics module (boolean)
    t.modules.sound = true             -- Enable the sound module (boolean)
    t.modules.system = true            -- Enable the system module (boolean)
    t.modules.timer = true             -- Enable the timer module (boolean)
    t.modules.window = true            -- Enable the window module (boolean)
    t.modules.thread = true            -- Enable the thread module (boolean)
    t.console = true
    t.title = "Tutorial Game"
    t.version = "0.9.1"
    t.screen.fullscreen = false
    t.screen.vsync = true
    t.screen.height = 600
    t.screen.width = 800
    t.fsaa = 0 
end
main.lua:

function love.load()
    print("Hello world")
end

function love.draw()
end

function love.update(dt)
end

function love.focus(bool)
end

function love.keypressed(key, unicode)
end

function love.keyreleased(key, unicode)
end

function love.mousepressed(x, y, button)
end

function mousereleased(x, y, button)
end

function love.quit()
end
控制台应显示:

Hello world
但我看到的只是

 
我希望有人能帮我解决这个问题

注意:在Lua中正常运行print()命令(不使用Love2D)可以正常工作。 我在love2d-0.8.0上运行了完全相同的版本(但版本为0.8.0),但问题没有出现。 我想我会把这当作一个bug来报告。。。
当然,您只能使用自己的lua51.dll,因为这个新版本可能与LuaJIT和Love2D-0.9.1不兼容有关。如果您在Mac下,您应该从命令行运行,如:

/Applications/love.app/Contents/MacOS/love <path to you dir or .love file>
/Applications/love.app/Contents/MacOS/love
如果您在Windows下,请配置:

t、 控制台=真

在love2d 0.9.1中应该可以工作。

我认为t.screen不起作用,但t.window起作用

尝试将
love.graphics.print(“Hello world!”)
放在绘图功能中


从0.9.1版开始,löve2d已经使用了LuaJIT

我也遇到了同样的问题

我对此问题的解决方案是,我知道这听起来很愚蠢,要么从
love.conf(t)
中删除行
t.console=true
,要么将值从
true
更改为
false


(我使用适用于win64的love2d版本0.9.2)

我感谢您的帮助,但是,如果您查看我的conf.lua,您会发现我启用了控制台,因此我不能说这个答案会有帮助,对不起。您在哪个平台上运行love?Linux/MacOS/Windows?请不要在标题中添加“已解决”。表示问题已经解决的方法是接受答案。如果现有的答案都不能解决问题,请随意发布并接受您自己的答案。