wxwidgets with sfml Topic is solved

If you are using the main C++ distribution of wxWidgets, Feel free to ask any question related to wxWidgets development here. This means questions regarding to C++ and wxWidgets, not compile problems.
Post Reply
gustxw
Earned a small fee
Earned a small fee
Posts: 12
Joined: Thu Aug 08, 2019 8:41 pm

wxwidgets with sfml

Post by gustxw »

hey there im trying to get sfml 2.4.2 to work with wx widgets
3.1 on codeblocks windows 10 and im following this guide
https://www.sfml-dev.org/tutorials/1.6/ ... om-control
because its the only
one that ive found even tho its for sfml 1.6

ive gotten thru some of the other hurdles but have no ideas how to fix this i googled rvalues and lvalues but
still cant think of how to fix this

right now im getting this error here/attached

invalid initialization of non-const reference of type 'wxPoint&' from an rvalue of type 'wxPoint'|
Attachments
wxsfmlerror.PNG
User avatar
doublemax
Moderator
Moderator
Posts: 19115
Joined: Fri Apr 21, 2006 8:03 pm
Location: $FCE2

Re: wxwidgets with sfml

Post by doublemax »

Code: Select all

    MyCanvas(wxWindow*  Parent,
             wxWindowID Id,
             const wxPoint&   Position,
             const wxSize&    Size,
Change Position and Size to be const references.
Use the source, Luke!
gustxw
Earned a small fee
Earned a small fee
Posts: 12
Joined: Thu Aug 08, 2019 8:41 pm

Re: wxwidgets with sfml

Post by gustxw »

thanks!
Post Reply