Compiling errors

Do you have a question about makefiles, a compiler or IDE you are using and need to know how to set it up for wxWidgets or why it doesn't compile but other IDE's do ? Post your questions here.
NonoNano
Experienced Solver
Experienced Solver
Posts: 71
Joined: Sun Mar 25, 2018 6:12 pm

Re: Compiling errors

Post by NonoNano »

I replaced "gl_bitmap_panel.h" in the folder of the test app, opened C:B and recompiled. I see the image of the lion still in black and white. The file I'm using now has a size of 4KiB
User avatar
doublemax
Moderator
Moderator
Posts: 19114
Joined: Fri Apr 21, 2006 8:03 pm
Location: $FCE2

Re: Compiling errors

Post by doublemax »

The test program is the "minimal.cpp" from above.
Use the source, Luke!
NonoNano
Experienced Solver
Experienced Solver
Posts: 71
Joined: Sun Mar 25, 2018 6:12 pm

Re: Compiling errors

Post by NonoNano »

I get this error at compile time when I try to use minimal.cpp a the test program
/home/pi/Desktop/Prova/MyApp/CameraGUIForm.cpp|47|error: ‘GLBitmapPanel::PixelFormat’ is not a class or namespace|
User avatar
doublemax
Moderator
Moderator
Posts: 19114
Joined: Fri Apr 21, 2006 8:03 pm
Location: $FCE2

Re: Compiling errors

Post by doublemax »

You do understand that the minimal.cpp is a standalone test and has nothing to do with your CameraGUIForm.cpp?

Leave CameraGUIForm alone until the test app works.

Try GLBitmapPanel::RGBA8 instead of GLBitmapPanel::PixelFormat::RGBA8.

BTW: What gcc version is on that machine? (gcc -v)
Use the source, Luke!
NonoNano
Experienced Solver
Experienced Solver
Posts: 71
Joined: Sun Mar 25, 2018 6:12 pm

Re: Compiling errors

Post by NonoNano »

Yes I understood that, I've just renamed what you called "MyApp" in "CameraGUIForm" bacause it was easier for me to build it..but the rest of the code is the same as "MyApp".

this:
Try GLBitmapPanel::RGBA8 instead of GLBitmapPanel::PixelFormat::RGBA8.
did the trick and application is now compiling/running. It is an animaeted panel divided in 6 parts. Each part has red at top-right corner and turns into green on the bottom left. The six panels are scrolling from right to left
User avatar
doublemax
Moderator
Moderator
Posts: 19114
Joined: Fri Apr 21, 2006 8:03 pm
Location: $FCE2

Re: Compiling errors

Post by doublemax »

Good. It's important that you enable the OpenGL driver with hardware acceleration (I linked the description in the other thread), otherwise the OpenGL method will be painfully slow. I actually had a chance to test this on a real RPi over the weekend. With the standard video driver i get 350% Cpu load in that demo, with hardware acceleration around 45-50% which is hopefully fast enough.
Use the source, Luke!
NonoNano
Experienced Solver
Experienced Solver
Posts: 71
Joined: Sun Mar 25, 2018 6:12 pm

Re: Compiling errors

Post by NonoNano »

Therefore the next step is to integrate this new ""gl_bitmap_panel.h"" in the main project right? I will try it now
NonoNano
Experienced Solver
Experienced Solver
Posts: 71
Joined: Sun Mar 25, 2018 6:12 pm

Re: Compiling errors

Post by NonoNano »

Cannot understand why but I get these errors:
/usr/include/wx-3.0/wx/app.h|832|error: invalid static_cast from type ‘wxAppConsole*’ to type ‘CameraGUIForm*’|

/home/pi/Desktop/Prova/CameraGUI_OpenGL/main.cpp|4|error: cannot convert ‘CameraGUIForm*’ to ‘wxAppConsole*’ in return|
Attachments
main.cpp
(250 Bytes) Downloaded 98 times
CameraGUIForm.h
(1.45 KiB) Downloaded 88 times
CameraGUIForm.cpp
(6.05 KiB) Downloaded 100 times
User avatar
doublemax
Moderator
Moderator
Posts: 19114
Joined: Fri Apr 21, 2006 8:03 pm
Location: $FCE2

Re: Compiling errors

Post by doublemax »

Is the main.cpp new? Didn't you already have a working application? Then you don't need it.
Use the source, Luke!
NonoNano
Experienced Solver
Experienced Solver
Posts: 71
Joined: Sun Mar 25, 2018 6:12 pm

Re: Compiling errors

Post by NonoNano »

I have removed main.cpp/main.h, moved OnInit implementation in CameraGUIForm.cpp, moved IMPLEMENT_APP(CameraGUIForm) at the beginnning of CameraGUIForm.cpp and still I get the two errors from above
User avatar
doublemax
Moderator
Moderator
Posts: 19114
Joined: Fri Apr 21, 2006 8:03 pm
Location: $FCE2

Re: Compiling errors

Post by doublemax »

Now i'm confused. Whatever you used when it last compiled, just replace gl_bitmap_panel.h. Nothing else.
Use the source, Luke!
NonoNano
Experienced Solver
Experienced Solver
Posts: 71
Joined: Sun Mar 25, 2018 6:12 pm

Re: Compiling errors

Post by NonoNano »

I tried also that but still it doesn't work
Attachments
2018-04-09-220759_800x480_scrot.png
User avatar
doublemax
Moderator
Moderator
Posts: 19114
Joined: Fri Apr 21, 2006 8:03 pm
Location: $FCE2

Re: Compiling errors

Post by doublemax »

Code: Select all

IMPLEMENT_APP(CameraGUIForm)

bool CameraGUIForm::OnInit()
These two occurrences of "CameraGUIForm" can't be right, because that's the name of the frame. But it's supposed to be the name of the app. So you must have changed that at some time.
Use the source, Luke!
NonoNano
Experienced Solver
Experienced Solver
Posts: 71
Joined: Sun Mar 25, 2018 6:12 pm

Re: Compiling errors

Post by NonoNano »

Now it works!!! And it has run for 30 minutes without slowing down and this is a good sign!!! I have to thank you a lot again!!!
Do you think that I can implement it with the events instead of with the critical sections? Do you think it is worth to do? Thank you a lot!

By the way I have to solve the problem of the blinking buttons
User avatar
doublemax
Moderator
Moderator
Posts: 19114
Joined: Fri Apr 21, 2006 8:03 pm
Location: $FCE2

Re: Compiling errors

Post by doublemax »

Do you think that I can implement it with the events instead of with the critical sections? Do you think it is worth to do?
I don't see any advantage in that. The nice thing about the GLBitmapPanel class is that it handles everything for you, so from the calling side you don't have to deal with the critical sections.
By the way I have to solve the problem of the blinking buttons
Can you show a screenshot of the whole window? If the buttons overlap the image area, you just have to change the coordinates of the image panel. Or even better, use sizers for the layout.
Use the source, Luke!
Post Reply