About Monkey 2 › Forums › Monkey 2 Development › external abstract won't compile in debug mode (w7 and elcapitan)
This topic contains 5 replies, has 2 voices, and was last updated by
abakobo
2 years, 7 months ago.
-
AuthorPosts
-
September 5, 2016 at 11:03 am #3669
I get the following error message when trying to compile the code below in debug mode. The same happen with any other c++ pure virtual method extended/implemented in mx2
Both w7 and elcapitan will compile and run correctly in release mode…
Files are attached.[/crayon]Monkey1234567891011121314151617181920212223[crayon-5cba16a577c8d147738954 inline="true" ]Compiling....Build error: System command 'g++ -std=c++11 -Wno-deprecated-declarations -Wno-tautological-pointer-compare -Wno-undefined-bool-conversion -Wno-int-to-void-pointer-cast -Wno-inconsistent-missing-override -Wno-logical-op-parentheses -Wno-parentheses-equality -O0 -I"/Users/koko/Desktop/monkey2-ako104/modules/monkey/native" -I"/Users/koko/Desktop/monkey2-ako104/modules/" -I"/Users/koko/Desktop/ext_syn/ext_v_by_pointer/" -c -o "/Users/koko/Desktop/ext_syn/ext_v_by_pointer/external_v_by_ptr.buildv1.0.4/macos_debug/build/_1src_2external_00v_00by_00ptr_0external_00v_00by_00ptr.cpp.o" "/Users/koko/Desktop/ext_syn/ext_v_by_pointer/external_v_by_ptr.buildv1.0.4/macos_debug/src/external_0v_0by_0ptr_external_0v_0by_0ptr.cpp"' failed.g++ -std=c++11 -Wno-deprecated-declarations -Wno-tautological-pointer-compare -Wno-undefined-bool-conversion -Wno-int-to-void-pointer-cast -Wno-inconsistent-missing-override -Wno-logical-op-parentheses -Wno-parentheses-equality -O0 -I"/Users/koko/Desktop/monkey2-ako104/modules/monkey/native" -I"/Users/koko/Desktop/monkey2-ako104/modules/" -I"/Users/koko/Desktop/ext_syn/ext_v_by_pointer/" -c -o "/Users/koko/Desktop/ext_syn/ext_v_by_pointer/external_v_by_ptr.buildv1.0.4/macos_debug/build/_1src_2external_00v_00by_00ptr_0external_00v_00by_00ptr.cpp.o" "/Users/koko/Desktop/ext_syn/ext_v_by_pointer/external_v_by_ptr.buildv1.0.4/macos_debug/src/external_0v_0by_0ptr_external_0v_0by_0ptr.cpp"/Users/koko/Desktop/ext_syn/ext_v_by_pointer/external_v_by_ptr.buildv1.0.4/macos_debug/src/external_0v_0by_0ptr_external_0v_0by_0ptr.cpp:31:3: error: no member named 'dbEmit' in 'Foo'; did you mean simply 'dbEmit'?Foo::dbEmit();^~~~~~~~~~~dbEmit/Users/koko/Desktop/ext_syn/ext_v_by_pointer/external_v_by_ptr.buildv1.0.4/macos_debug/src/external_0v_0by_0ptr_external_0v_0by_0ptr.cpp:30:32: note: 'dbEmit' declared herevoid t_default_nonAbstractFoo::dbEmit(){^/Users/koko/Desktop/ext_syn/ext_v_by_pointer/external_v_by_ptr.buildv1.0.4/macos_debug/src/external_0v_0by_0ptr_external_0v_0by_0ptr.cpp:46:10: error: no matching function for call to 'bbDBObjectValue'return bbDBObjectValue(*p);^~~~~~~~~~~~~~~/Users/koko/Desktop/monkey2-ako104/modules/monkey/native/bbobject.h:65:17: note: candidate function not viable: no known conversion from 't_default_nonAbstractFoo *' to 'bbObject *' for 1st argumentinline bbString bbDBObjectValue( bbObject *p ){^2 errors generated.***** Fatal mx2cc error *****Internal mx2cc build errorwith this code:
.h[/crayon]Monkey123456789101112131415161718192021[crayon-5cba16a577c93935153771 inline="true" ]// external_v.h#ifndef EXTERNAL_V_H#define EXTERNAL_V_Hclass Foo{private:int prv;public:Foo(){prv=0;}virtual ~Foo() {} // Ensures to invoke actual object destructorvoid Set(int i) {prv=i;}int Get() { return prv; }virtual void MyVM(int* i) = 0;};#endif.monkey2
[/crayon]Monkey1234567891011121314151617181920212223242526272829[crayon-5cba16a577c97187361811 inline="true" ]' external_v.monkey2#Import "<std>"#Import "external_v.h"ExternClass Foo Extends Void AbstractPrivateField prv:intPublicMethod Set(i:int)Method Get:Int()Method MyVM(i:Int ptr) AbstractEndPublicClass nonAbstractFoo Extends FooMethod MyVM(i:Int ptr) OverridePrint "MyVM has been called! "+i[0]EndEndFunction Main()Local Fofo:nonAbstractFooFofo=New nonAbstractFoo()Fofo.Set(10)Print Fofo.Get()Local j:=7Fofo.MyVM(Varptr j)EndAttachments:
September 5, 2016 at 7:16 pm #3684Fixed on github, but there’s likely to be more like this – keep reporting them thanks.
September 7, 2016 at 7:17 am #3729It is still giving an error..
W7 message
[/crayon]Monkey12345678910111213141516171819202122232425[crayon-5cba16a57ff34848136043 inline="true" ]Compiling...Build error: System command 'g++ -std=c++11 -m32 -I"C:/Users/poilux/Desktop/monkey2-abakobo-eol_manag/modules/monkey/native" -I"C:/Users/poilux/Desktop/monkey2-abakobo-eol_manag/modules/" -I"C:/extv/" -c -o "C:/extv/external_v.buildv1.0.5/windows_debug/build/_1src_2external_00v_0external_00v.cpp.o" "C:/extv/external_v.buildv1.0.5/windows_debug/src/external_0v_external_0v.cpp"' failed.g++ -std=c++11 -m32 -I"C:/Users/poilux/Desktop/monkey2-abakobo-eol_manag/modules/monkey/native" -I"C:/Users/poilux/Desktop/monkey2-abakobo-eol_manag/modules/" -I"C:/extv/" -c -o "C:/extv/external_v.buildv1.0.5/windows_debug/build/_1src_2external_00v_0external_00v.cpp.o" "C:/extv/external_v.buildv1.0.5/windows_debug/src/external_0v_external_0v.cpp"C:/extv/external_v.buildv1.0.5/windows_debug/src/external_0v_external_0v.cpp: In member function 'void t_default_nonAbstractFoo::dbEmit()':C:/extv/external_v.buildv1.0.5/windows_debug/src/external_0v_external_0v.cpp:28:3: error: 'dbEmit' is not a member of 'Foo'Foo::dbEmit();^C:/extv/external_v.buildv1.0.5/windows_debug/src/external_0v_external_0v.cpp: In function 'bbString bbDBValue(t_default_nonAbstractFoo**)':C:/extv/external_v.buildv1.0.5/windows_debug/src/external_0v_external_0v.cpp:43:28: error: cannot convert 't_default_nonAbstractFoo*' to 'bbObject*' for argument '1' to 'bbString bbDBObjectValue(bbObject*)'return bbDBObjectValue(*p);^***** Fatal mx2cc error *****Internal mx2cc build errorosx message
[/crayon]Monkey1234567891011121314151617181920212223[crayon-5cba16a57ff3a239287511 inline="true" ]Compiling...Build error: System command 'g++ -std=c++11 -Wno-deprecated-declarations -Wno-tautological-pointer-compare -Wno-undefined-bool-conversion -Wno-int-to-void-pointer-cast -Wno-inconsistent-missing-override -Wno-logical-op-parentheses -Wno-parentheses-equality -O0 -I"/Users/koko/Desktop/monkey2-ako105b/modules/monkey/native" -I"/Users/koko/Desktop/monkey2-ako105b/modules/" -I"/Users/koko/Desktop/ext_syn/ext_v_by_pointer/" -c -o "/Users/koko/Desktop/ext_syn/ext_v_by_pointer/external_v_by_ptr.buildv1.0.5/macos_debug/build/_1src_2external_00v_00by_00ptr_0external_00v_00by_00ptr.cpp.o" "/Users/koko/Desktop/ext_syn/ext_v_by_pointer/external_v_by_ptr.buildv1.0.5/macos_debug/src/external_0v_0by_0ptr_external_0v_0by_0ptr.cpp"' failed.g++ -std=c++11 -Wno-deprecated-declarations -Wno-tautological-pointer-compare -Wno-undefined-bool-conversion -Wno-int-to-void-pointer-cast -Wno-inconsistent-missing-override -Wno-logical-op-parentheses -Wno-parentheses-equality -O0 -I"/Users/koko/Desktop/monkey2-ako105b/modules/monkey/native" -I"/Users/koko/Desktop/monkey2-ako105b/modules/" -I"/Users/koko/Desktop/ext_syn/ext_v_by_pointer/" -c -o "/Users/koko/Desktop/ext_syn/ext_v_by_pointer/external_v_by_ptr.buildv1.0.5/macos_debug/build/_1src_2external_00v_00by_00ptr_0external_00v_00by_00ptr.cpp.o" "/Users/koko/Desktop/ext_syn/ext_v_by_pointer/external_v_by_ptr.buildv1.0.5/macos_debug/src/external_0v_0by_0ptr_external_0v_0by_0ptr.cpp"/Users/koko/Desktop/ext_syn/ext_v_by_pointer/external_v_by_ptr.buildv1.0.5/macos_debug/src/external_0v_0by_0ptr_external_0v_0by_0ptr.cpp:31:3: error: no member named 'dbEmit' in 'Foo'; did you mean simply 'dbEmit'?Foo::dbEmit();^~~~~~~~~~~dbEmit/Users/koko/Desktop/ext_syn/ext_v_by_pointer/external_v_by_ptr.buildv1.0.5/macos_debug/src/external_0v_0by_0ptr_external_0v_0by_0ptr.cpp:30:32: note: 'dbEmit' declared herevoid t_default_nonAbstractFoo::dbEmit(){^/Users/koko/Desktop/ext_syn/ext_v_by_pointer/external_v_by_ptr.buildv1.0.5/macos_debug/src/external_0v_0by_0ptr_external_0v_0by_0ptr.cpp:46:10: error: no matching function for call to 'bbDBObjectValue'return bbDBObjectValue(*p);^~~~~~~~~~~~~~~/Users/koko/Desktop/monkey2-ako105b/modules/monkey/native/bbobject.h:65:17: note: candidate function not viable: no known conversion from 't_default_nonAbstractFoo *' to 'bbObject *' for 1st argumentinline bbString bbDBObjectValue( bbObject *p ){^2 errors generated.***** Fatal mx2cc error *****Internal mx2cc build errorSeptember 7, 2016 at 7:58 am #3732It’s working here – did you rebuild all?
September 7, 2016 at 2:31 pm #3746I’ve checked twice (w7 and 10) and the src/tanslator_cpp.monkey2 is the new one (line 584 is modified with old code in comment). Rebuildall and dbEmit error.. May be some other modified files are on your side? On the github commit I just see that file marked as modified. (Commit 9e7c7a56)
I can’t try the actual git master as ted2 won’t launch (new issue with w7 and w10). Have not tried on osx with latest git.
Should it work with 1.0.4 with just that modified translator_cpp replaced?
September 9, 2016 at 7:55 am #3815now running in debug mode with latest github download…
-
AuthorPosts
You must be logged in to reply to this topic.