Closed LorenzoJohnson closed 11 months ago
I ran in both mingw and Visual Studio's build tools and it might not be worth mentioning, but I receive the exact same as in this issue and the following linked issue. Might help narrow it down, at least. https://github.com/perbone/luascript/issues/62
-- Edit --
Build succeeds on https://github.com/godotengine/godot/releases/tag/4.0.4-stable As much as I'd like to have the latest, this'll have to do for now.
@perbone Hello, you can now test it without a Windows computer! See https://www.reddit.com/r/godot/comments/10q1gim/just_released_a_github_action_to_setup_godot_net/
I ran in both mingw and Visual Studio's build tools and it might not be worth mentioning, but I receive the exact same as in this issue and the following linked issue. Might help narrow it down, at least. #62
-- Edit --
Build succeeds on https://github.com/godotengine/godot/releases/tag/4.0.4-stable As much as I'd like to have the latest, this'll have to do for now.
Using VS or MingW? I tried on my own side on a build of 4.0.4 but that still threw errors on MingW.
I ran in both mingw and Visual Studio's build tools and it might not be worth mentioning, but I receive the exact same as in this issue and the following linked issue. Might help narrow it down, at least. #62 -- Edit -- Build succeeds on https://github.com/godotengine/godot/releases/tag/4.0.4-stable As much as I'd like to have the latest, this'll have to do for now.
Using VS or MingW? I tried on my own side on a build of 4.0.4 but that still threw errors on MingW.
Got it working with the VS build tools. It's really an act of God I got it working at all. I wish I could help more but I just gave up after I couldn't debug with breakpoints and used C# instead. :(
Well... luascript not work with new version 4.1 of Godot. It only works with v4.0.4. Here is the exe by Microsoft VS if anyone need: https://www.mediafire.com/file/986t8d1mqzrzr83/godot-4.0.4%252Bluascript.zip/file
It would be nice if dev fix for new version of Godot! Thank you and regards.
Hi all!
I now have a Windows machine and may work on this soon.
-- Perbone
I added missing new methods and it compiled without issues using Windows 11 and VS2022. Please try again.
-- Perbone
I build godot 4.1.2 with MSVS 2019 error failed:
command: scons platform=windows module_luascript_enabled=yes
Error:
lua_script.cpp
[ 30%] D:\Downloads\_Dev\godot-4.1.2\modules\luascript\lua_script.h(57): error C3668: 'LuaScript::get_class_icon_path': method with override specifier 'override' did not override any base class methodsD:\Downloads\_Dev\godot-4.1.2\modules\luascript\lua_script.h(57): error C3668: 'LuaScript::get_class_icon_path': method with override specifier 'override' did not override any base class methodsD:\Downloads\_Dev\godot-4.1.2\modules\luascript\lua_script.h(57): error C3668: 'LuaScript::get_class_icon_path': method with override specifier 'override' did not override any base class methodsD:\Downloads\_Dev\godot-4.1.2\modules\luascript\lua_script.h(57): error C3668: 'LuaScript::get_class_icon_path': method with override specifier 'override' did not override any base class methodsD:\Downloads\_Dev\godot-4.1.2\modules\luascript\lua_script.h(57): error C3668: 'LuaScript::get_class_icon_path': method with override specifier 'override' did not override any base class methods
D:\Downloads\_Dev\godot-4.1.2\modules\luascript\lua_script.h(66): error C3668: 'LuaScript::is_abstract': method with override specifier 'override' did not override any base class methodsD:\Downloads\_Dev\godot-4.1.2\modules\luascript\lua_script.h(66): error C3668: 'LuaScript::is_abstract': method with override specifier 'override' did not override any base class methodsD:\Downloads\_Dev\godot-4.1.2\modules\luascript\lua_script.h(66): error C3668: 'LuaScript::is_abstract': method with override specifier 'override' did not override any base class methodsD:\Downloads\_Dev\godot-4.1.2\modules\luascript\lua_script.h(66): error C3668: 'LuaScript::is_abstract': method with override specifier 'override' did not override any base class methods
D:\Downloads\_Dev\godot-4.1.2\modules\luascript\lua_script.h(66): error C3668: 'LuaScript::is_abstract': method with override specifier 'override' did not override any base class methods
D:\Downloads\_Dev\godot-4.1.2\modules\luascript\lua_script_instance.h(34): error C3668: 'LuaScriptInstance::validate_property': method with override specifier 'override' did not override any base class methods
D:\Downloads\_Dev\godot-4.1.2\modules\luascript\lua_script_instance.h(47): error C3668: 'LuaScriptInstance::notification': method with override specifier 'override' did not override any base class methods
D:\Downloads\_Dev\godot-4.1.2\modules\luascript\lua_script_instance.h(34): error C3668: 'LuaScriptInstance::validate_property': method with override specifier 'override' did not override any base class methods
D:\Downloads\_Dev\godot-4.1.2\modules\luascript\lua_script_instance.h(47): error C3668: 'LuaScriptInstance::notification': method with override specifier 'override' did not override any base class methods
[ 31%] D:\Downloads\_Dev\godot-4.1.2\modules\luascript\lua_script_language.h(53): error C3668: 'LuaScriptLanguage::get_doc_comment_delimiters': method with override specifier 'override' did not override any base class methods
D:\Downloads\_Dev\godot-4.1.2\modules\luascript\lua_script_language.h(53): error C3668: 'LuaScriptLanguage::get_doc_comment_delimiters': method with override specifier 'override' did not override any base class methods
D:\Downloads\_Dev\godot-4.1.2\modules\luascript\lua_script_language.h(53): error C3668: 'LuaScriptLanguage::get_doc_comment_delimiters': method with override specifier 'override' did not override any base class methods
D:\Downloads\_Dev\godot-4.1.2\modules\luascript\lua_script_language.h(53): error C3668: 'LuaScriptLanguage::get_doc_comment_delimiters': method with override specifier 'override' did not override any base class methods
[ 31%] D:\Downloads\_Dev\godot-4.1.2\modules\luascript\lua_script.h(57): error C3668: 'LuaScript::get_class_icon_path': method with override specifier 'override' did not override any base class methods
D:\Downloads\_Dev\godot-4.1.2\modules\luascript\lua_script.h(66): error C3668: 'LuaScript::is_abstract': method with override specifier 'override' did not override any base class methods
[ 31%] D:\Downloads\_Dev\godot-4.1.2\modules\luascript\lua_script_language.h(53): error C3668: 'LuaScriptLanguage::get_doc_comment_delimiters': method with override specifier 'override' did not override any base class methods
[ 31%] modules\luascript\lua_script.cpp(85): error C2259: 'LuaScriptInstance': cannot instantiate abstract class
D:\Downloads\_Dev\godot-4.1.2\modules\luascript\lua_script_instance.h(24): note: see declaration of 'LuaScriptInstance'
modules\luascript\lua_script.cpp(85): note: due to following members:
modules\luascript\lua_script.cpp(85): note: 'void ScriptInstance::notification(int)': is abstract
.\core/object/script_language.h(206): note: see declaration of 'ScriptInstance::notification'
modules\luascript\lua_script.cpp(85): error C2259: 'LuaScriptInstance': cannot instantiate abstract class
D:\Downloads\_Dev\godot-4.1.2\modules\luascript\lua_script_instance.h(24): note: see declaration of 'LuaScriptInstance'
modules\luascript\lua_script.cpp(85): note: due to following members:
modules\luascript\lua_script.cpp(85): note: 'void ScriptInstance::notification(int)': is abstract
.\core/object/script_language.h(206): note: see declaration of 'ScriptInstance::notification'
[ 33%] scons: *** [modules\luascript\lua_script.windows.editor.x86_64.obj] Error 2
Compiling modules\navigation\navigation_mesh_generator.cpp ...
scons: *** [modules\luascript\lua_script_resource_formate_saver.windows.editor.x86_64.obj] Error 2
scons: *** [modules\luascript\lua_script_resource_formate_loader.windows.editor.x86_64.obj] Error 2
scons: *** [modules\luascript\lua_script_language.windows.editor.x86_64.obj] Error 2
scons: *** [modules\luascript\lua_script_instance.windows.editor.x86_64.obj] Error 2
scons: *** [modules\luascript\register_types.windows.editor.x86_64.obj] Error 2
navigation_mesh_generator.cpp
scons: building terminated because of errors.
What have I done wrong here? Can you take a look?
Thank you and regards!
I believe it's because you are behind the master version. Probably the API changes that I fixed come in on the latest commits that only master has for the time been. Try compiling it against master, that was the branch I used. -- Perbone
Build is ok without error! But the lua code not run at all. I attach lua code to node but the script not run. When I open godot with console I see that console alway print this to output nonstop:
9164 2023-10-16 11:08:10.117 0 0 L
9164 2023-10-16 11:08:10.251 0 0 r
9164 2023-10-16 11:08:10.254 0 0 L
9164 2023-10-16 11:08:10.823 0 0 L
9164 2023-10-16 11:08:10.826 0 0 L
9164 2023-10-16 11:08:11.079 0 0 L
9164 2023-10-16 11:08:11.083 0 0 L
9164 2023-10-16 11:08:11.348 0 0 L
9164 2023-10-16 11:08:11.351 0 0 L
9164 2023-10-16 11:08:12.099 0 0 L
9164 2023-10-16 11:08:12.103 0 0 L
9164 2023-10-16 11:08:12.128 0 0 L
...
I have no idea but maybe something wrong on my environment. I will try to test it on a virtual machine!
Thank and regards!
Hi! Yeah some things are broken on windows I just started working on this platform. I'm looking into the issues, I hope I can have a version working soon. --Perbone
@perbone It would be great if there were a ready-compiled version, which, like me, is too difficult for people who can't compile; Hope there is a compiled version of windows, thanks for sharing.
Right... Well, at the moment there is little too see, as a full blow integration with Godot, the editor etc has a lot of boilerplate code that is not shown to the end user (the game developer). So at some point I will set up a build workflow to generate ready-to-use binaries. For now, unfortunately, it's up to you too compile the module. -- perbone
I added missing new methods and it compiled without issues using Windows 11 and VS2022. Please try again.
-- Perbone -- Hello, Perbone System:win10 + scons 4.6 I build godot 4.2.1 with scons 4.6 + mingw-w64-v11.0.0 error failed: command: scons -j10 platform=windows module_luascript_enabled=yes
What's the solution? Thank you.
modules\luascript\lib\antlr4\CommonTokenFactory.cpp:14:50: warning: 'antlr4::CommonTokenFactory::DEFAULT' redeclared without dllimport attribute: previous dllimport ignored [-Wattributes]
14 | const std::uniqueptr<TokenFactory~~~~~
modules\luascript\lib\antlr4\CommonTokenFactory.cpp:16:1: warning: 'antlr4::CommonTokenFactory::CommonTokenFactory(bool)' redeclared without dllimport attribute: previous dllimport ignored [-Wattributes]
16 | CommonTokenFactory::CommonTokenFactory(bool copyText~~~~~
modules\luascript\lib\antlr4\CommonTokenFactory.cpp:19:1: warning: 'antlr4::CommonTokenFactory::CommonTokenFactory()' redeclared without dllimport attribute after being referenced with dll linkage
19 | CommonTokenFactory::CommonTokenFactory() : CommonTokenFactory(false) {
| ^~~~~~
modules\luascript\lib\antlr4\CommonTokenFactory.cpp:22:30: warning: 'virtual std::unique_ptr<antlr4::CommonToken, std::default_delete~~~~~
modules\luascript\lib\antlr4\CommonTokenFactory.cpp:37:30: warning: 'virtual std::unique_ptr<antlr4::CommonToken, std::default_delete~~~~~
In destructor 'std::unique_ptr<_Tp, _Dp>::~unique_ptr() [with _Tp = antlr4::TokenFactory~~~~~
modules\luascript\lib\antlr4\CommonToken.cpp:23:44: warning: 'antlr4::CommonToken::EMPTY_SOURCE' redeclared without dllimport attribute: previous dllimport ignored [-Wattributes]
23 | const std::pair<TokenSource, CharStream> CommonToken::EMPTY_SOURCE;
| ^~~
modules\luascript\lib\antlr4\CommonToken.cpp:25:1: warning: 'antlr4::CommonToken::CommonToken(size_t)' redeclared without dllimport attribute: previous dllimport ignored [-Wattributes]
25 | CommonToken::CommonToken(size_t type) {
| ^~~
modules\luascript\lib\antlr4\CommonToken.cpp:30:1: warning: 'antlr4::CommonToken::CommonToken(std::pair<antlr4::TokenSource, antlr4::CharStream>, size_t, size_t, size_t, size_t)' redeclared without dllimport attribute: previous dllimport ignored [-Wattributes]
30 | CommonToken::CommonToken(std::pair<TokenSource, CharStream> source, size_t type, size_t channel, size_t start, size_t stop) {
| ^~~
modules\luascript\lib\antlr4\CommonToken.cpp:43:1: warning: 'antlr4::CommonToken::CommonToken(size_t, const std::string&)' redeclared without dllimport attribute: previous dllimport ignored [-Wattributes]
43 | CommonToken::CommonToken(size_t type, const std::string &text) {
| ^~~
modules\luascript\lib\antlr4\CommonToken.cpp:51:1: warning: 'antlr4::CommonToken::CommonToken(antlr4::Token)' redeclared without dllimport attribute: previous dllimport ignored [-Wattributes]
51 | CommonToken::CommonToken(Token oldToken) {
| ^~~
modules\luascript\lib\antlr4\CommonToken.cpp:70:8: warning: 'virtual size_t antlr4::CommonToken::getType() const' redeclared without dllimport attribute: previous dllimport ignored [-Wattributes]
70 | size_t CommonToken::getType() const {
| ^~~
modules\luascript\lib\antlr4\CommonToken.cpp:74:6: warning: 'virtual void antlr4::CommonToken::setLine(size_t)' redeclared without dllimport attribute: previous dllimport ignored [-Wattributes]
74 | void CommonToken::setLine(size_t line) {
| ^~~
modules\luascript\lib\antlr4\CommonToken.cpp:78:13: warning: 'virtual std::string antlr4::CommonToken::getText() const' redeclared without dllimport attribute: previous dllimport ignored [-Wattributes]
78 | std::string CommonToken::getText() const {
| ^~~
modules\luascript\lib\antlr4\CommonToken.cpp:95:6: warning: 'virtual void antlr4::CommonToken::setText(const std::string&)' redeclared without dllimport attribute: previous dllimport ignored [-Wattributes]
95 | void CommonToken::setText(const std::string &text) {
| ^~~
modules\luascript\lib\antlr4\CommonToken.cpp:99:8: warning: 'virtual size_t antlr4::CommonToken::getLine() const' redeclared without dllimport attribute: previous dllimport ignored [-Wattributes]
99 | size_t CommonToken::getLine() const {
| ^~~
modules\luascript\lib\antlr4\CommonToken.cpp:103:8: warning: 'virtual size_t antlr4::CommonToken::getCharPositionInLine() const' redeclared without dllimport attribute: previous dllimport ignored [-Wattributes]
103 | size_t CommonToken::getCharPositionInLine() const {
| ^~~
modules\luascript\lib\antlr4\CommonToken.cpp:107:6: warning: 'virtual void antlr4::CommonToken::setCharPositionInLine(size_t)' redeclared without dllimport attribute: previous dllimport ignored [-Wattributes]
107 | void CommonToken::setCharPositionInLine(size_t charPositionInLine) {
| ^~~
modules\luascript\lib\antlr4\CommonToken.cpp:111:8: warning: 'virtual size_t antlr4::CommonToken::getChannel() const' redeclared without dllimport attribute: previous dllimport ignored [-Wattributes]
111 | size_t CommonToken::getChannel() const {
| ^~~
modules\luascript\lib\antlr4\CommonToken.cpp:115:6: warning: 'virtual void antlr4::CommonToken::setChannel(size_t)' redeclared without dllimport attribute: previous dllimport ignored [-Wattributes]
115 | void CommonToken::setChannel(size_t channel) {
| ^~~
modules\luascript\lib\antlr4\CommonToken.cpp:119:6: warning: 'virtual void antlr4::CommonToken::setType(size_t)' redeclared without dllimport attribute: previous dllimport ignored [-Wattributes]
119 | void CommonToken::setType(size_t type) {
| ^~~
modules\luascript\lib\antlr4\CommonToken.cpp:123:8: warning: 'virtual size_t antlr4::CommonToken::getStartIndex() const' redeclared without dllimport attribute: previous dllimport ignored [-Wattributes]
123 | size_t CommonToken::getStartIndex() const {
| ^~~
modules\luascript\lib\antlr4\CommonToken.cpp:127:6: warning: 'virtual void antlr4::CommonToken::setStartIndex(size_t)' redeclared without dllimport attribute: previous dllimport ignored [-Wattributes]
127 | void CommonToken::setStartIndex(size_t start) {
| ^~~
modules\luascript\lib\antlr4\CommonToken.cpp:131:8: warning: 'virtual size_t antlr4::CommonToken::getStopIndex() const' redeclared without dllimport attribute: previous dllimport ignored [-Wattributes]
131 | size_t CommonToken::getStopIndex() const {
| ^~~
modules\luascript\lib\antlr4\CommonToken.cpp:135:6: warning: 'virtual void antlr4::CommonToken::setStopIndex(size_t)' redeclared without dllimport attribute: previous dllimport ignored [-Wattributes]
135 | void CommonToken::setStopIndex(size_t stop) {
| ^~~
modules\luascript\lib\antlr4\CommonToken.cpp:139:8: warning: 'virtual size_t antlr4::CommonToken::getTokenIndex() const' redeclared without dllimport attribute: previous dllimport ignored [-Wattributes]
139 | size_t CommonToken::getTokenIndex() const {
| ^~~
modules\luascript\lib\antlr4\CommonToken.cpp:143:6: warning: 'virtual void antlr4::CommonToken::setTokenIndex(size_t)' redeclared without dllimport attribute: previous dllimport ignored [-Wattributes]
143 | void CommonToken::setTokenIndex(size_t index) {
| ^~~
modules\luascript\lib\antlr4\CommonToken.cpp:147:22: warning: 'virtual antlr4::TokenSource antlr4::CommonToken::getTokenSource() const' redeclared without dllimport attribute: previous dllimport ignored [-Wattributes]
147 | antlr4::TokenSource CommonToken::getTokenSource() const {
| ^~~
modules\luascript\lib\antlr4\CommonToken.cpp:151:21: warning: 'virtual antlr4::CharStream antlr4::CommonToken::getInputStream() const' redeclared without dllimport attribute after being referenced with dll linkage
151 | antlr4::CharStream CommonToken::getInputStream() const {
| ^~~
modules\luascript\lib\antlr4\CommonToken.cpp:155:13: warning: 'virtual std::string antlr4::CommonToken::toString() const' redeclared without dllimport attribute: previous dllimport ignored [-Wattributes]
155 | std::string CommonToken::toString() const {
| ^~~
modules\luascript\lib\antlr4\CommonToken.cpp:159:13: warning: 'virtual std::string antlr4::CommonToken::toString(antlr4::Recognizer) const' redeclared without dllimport attribute after being referenced with dll linkage
159 | std::string CommonToken::toString(Recognizer r) const {
| ^~~
modules\luascript\lib\antlr4\CommonToken.cpp:184:6: warning: 'void antlr4::CommonToken::InitializeInstanceFields()' redeclared without dllimport attribute after being referenced with dll linkage
184 | void CommonToken::InitializeInstanceFields() {
| ^~~
modules\luascript\lib\antlr4\CommonToken.cpp:23:44: error: definition of static data member 'antlr4::CommonToken::EMPTY_SOURCE' of dllimport'd class
23 | const std::pair<TokenSource, CharStream> CommonToken::EMPTY_SOURCE;
| ^~~
modules\luascript\lib\antlr4\ConsoleErrorListener.cpp:10:22: warning: 'antlr4::ConsoleErrorListener::INSTANCE' redeclared without dllimport attribute: previous dllimport ignored [-Wattributes]
10 | ConsoleErrorListener ConsoleErrorListener::INSTANCE;
| ^~~~~~~~
modules\luascript\lib\antlr4\ConsoleErrorListener.cpp:12:6: warning: 'virtual void antlr4::ConsoleErrorListener::syntaxError(antlr4::Recognizer, antlr4::Token, size_t, size_t, const std::string&, std::exception_ptr::exception_ptr)' redeclared without dllimport attribute: previous dllimport ignored [-Wattributes]
12 | void ConsoleErrorListener::syntaxError(Recognizer /recognizer/, Token /offendingSymbol/,
| ^~~~~~~~
In destructor 'virtual antlr4::BaseErrorListener::~BaseErrorListener()',
inlined from 'virtual antlr4::ConsoleErrorListener::~ConsoleErrorListener()' at modules\luascript\lib\antlr4\ConsoleErrorListener.h:12:26,
inlined from 'void tcf_0()' at modules\luascript\lib\antlr4\ConsoleErrorListener.cpp:10:22:
modules\luascript\lib\antlr4\ConsoleErrorListener.cpp:10:22: error: definition of static data member 'antlr4::ConsoleErrorListener::INSTANCE' of dllimport'd class
10 | ConsoleErrorListener ConsoleErrorListener::INSTANCE;
| ^~~~~~~~
===== scons: *** [modules\luascript\lib\antlr4\ConsoleErrorListener.windows.editor.x86_64.o] Error 1 scons: building terminated because of errors.
Hello, I am trying to compile a version of godot with luascript on windows 10, but am getting the following errors when compiling with the mingw gcc compiler:
I have managed to build godot without any additional modules, and am currently only trying to compile it with luascript so I don't think it's caused by external errors. Would it be possible to help with this?
Thanks for your help.