Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » U++ Library support » U++ Library : Other (not classified elsewhere) » Controls4U_Demo not compiling on Linux
Controls4U_Demo not compiling on Linux [message #54864] Wed, 23 September 2020 10:56 Go to next message
aquilarubra is currently offline  aquilarubra
Messages: 24
Registered: December 2019
Promising Member
I have release 14429 stable on Arch and Windows. On Windows, Controls4U_Demo compile. On Arch no, with an error in Function.h, line 17:

virtual Res Execute(ArgTypes... args) { return fn(args...); }

/home/phantom/upp.src/uppsrc/Core/Function.h (17): error: cannot initialize return object of type 'bool' with an rvalue of type 'void'

It looks strange to me that it only happens on Linux. I use clang on both systems. I don't know if it has something to do with my U++ aur packaging, but I doubt.

/home/phantom/upp.src/uppsrc/Core/Value.hpp (103): warning: implicit conversion from 'long' to 'double' changes value from 9223372036854775807 to 9223372036854775808 [-Wimplicit-int-float-conversion]
/home/phantom/upp.src/uppsrc/Core/Function.h (17): error: cannot initialize return object of type 'bool' with an rvalue of type 'void'
/home/phantom/upp.src/bazaar/Controls4U_Demo/main.cpp (1): In file included from /home/phantom/upp.src/bazaar/Controls4U_Demo/main.cpp:1:
/home/phantom/upp.src/uppsrc/CtrlLib/CtrlLib.h (4): In file included from /home/phantom/upp.src/uppsrc/CtrlLib/CtrlLib.h:4:
/home/phantom/upp.src/uppsrc/CtrlCore/CtrlCore.h (4): In file included from /home/phantom/upp.src/uppsrc/CtrlCore/CtrlCore.h:4:
/home/phantom/upp.src/uppsrc/RichText/RichText.h (4): In file included from /home/phantom/upp.src/uppsrc/RichText/RichText.h:4:
/home/phantom/upp.src/uppsrc/Draw/Draw.h (6): In file included from /home/phantom/upp.src/uppsrc/Draw/Draw.h:6:
/home/phantom/upp.src/uppsrc/Core/Core.h (312): In file included from /home/phantom/upp.src/uppsrc/Core/Core.h:312:
(): virtual Res Execute(ArgTypes... args) { return fn(args...); }
/home/phantom/upp.src/uppsrc/Core/Function.h (19): note: in instantiation of member function 'Upp::Function<bool ()>::Wrapper<Upp::CallbackN<> >::Execute' requested here
(): Wrapper(F&& fn) : fn(pick(fn)) {}
/home/phantom/upp.src/uppsrc/Core/Function.h (56): note: in instantiation of member function 'Upp::Function<bool ()>::Wrapper<Upp::CallbackN<> >::Wrapper' requested here
(): template <class F> Function(F fn) { ptr = new Wrapper<F>(pick(fn)); }
/home/phantom/upp.src/bazaar/Controls4U_Demo/main.cpp (79): note: in instantiation of function template specialization 'Upp::Function<bool ()>::Function<Upp::CallbackN<> >' requested here
(): FileName.WhenChange = THISBACK(OnNewFile);
/home/phantom/upp.src/uppsrc/Core/Callback.h (109): note: expanded from macro 'THISBACK'
(): #define THISBACK(x) callback(this, &CLASSNAME::x)
(): 1 warning and 1 error generated.

[Updated on: Wed, 23 September 2020 13:21]

Report message to a moderator

Re: Controls4U_Demo not compiling on Linux [message #54868 is a reply to message #54864] Wed, 23 September 2020 13:22 Go to previous messageGo to next message
aquilarubra is currently offline  aquilarubra
Messages: 24
Registered: December 2019
Promising Member
I updated my post. It's the Controls4U_Demo not compiling, not the Controls4U widgets.
Re: Controls4U_Demo not compiling on Linux [message #54881 is a reply to message #54868] Wed, 23 September 2020 20:28 Go to previous message
koldo is currently offline  koldo
Messages: 3404
Registered: August 2008
Senior Veteran
Dear Aquilarubra

Weird error, thank you to report.
No problem found until now with W10 or Ubuntu, MSC, GCC or CLANG.

I have replaced
fileName.WhenChange = THISBACK(OnNewFile);
with
fileName.WhenChange = [=]{return OnNewFile();};

You have got an error "cannot ... return object ... 'bool' with ... type 'void'

OnNewFile() returns bool instead of void but, I thought it should work.


Best regards
IƱaki
Previous Topic: RegExp
Next Topic: UnZip::GetPos() purpose?
Goto Forum:
  


Current Time: Fri Dec 13 22:19:21 CET 2024

Total time taken to generate the page: 0.01923 seconds