Author Topic: Code::Blocks and Raspberry Pi 4  (Read 883 times)

Offline dbrdh

  • Single posting newcomer
  • *
  • Posts: 3
Code::Blocks and Raspberry Pi 4
« on: January 01, 2020, 09:20:22 pm »
Hi all,

Have just bought a RP4 and installed C::B.

All OK but in trying out just to create a simple 'Hello World' GTK app. Sorted libraries for the compiler but I find the build fails due to:

 ‘gtk_button_new_from_stock’ is deprecated in the 'main.c' file: Use 'gtk_button_new_with_label' instead [-Wdeprecated-declarations]'

Wasn't expecting an IDE basic app build to fail out of the box but accept this maybe a Noob issue - where is the proper place to get an answer to this as I appreciate the "Read This' post and this may not be the correct forum to ask about this.

Thanks

Online stahta01

  • Lives here!
  • ****
  • Posts: 6895
    • My Best Post
Re: Code::Blocks and Raspberry Pi 4
« Reply #1 on: January 01, 2020, 09:26:06 pm »
Do you know the difference between error and warning?

Where is Code::Blocks installed? Edit2: On RP4 or other computer
What version is Code::Blocks?
What compiler are you using?
What is the Compiler version?

Edit: Add link on reporting issue
http://wiki.codeblocks.org/index.php?title=FAQ-Compiling_%28general%29#Q:_How_do_I_report_a_compilation_problem_on_the_forums.3F

Tim S.
« Last Edit: January 01, 2020, 10:15:59 pm by stahta01 »
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 32 bit.
On Debian Stretch, compiling CB Trunk against wxWidgets 3.0.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 12595
    • Travis build status
Re: Code::Blocks and Raspberry Pi 4
« Reply #2 on: January 02, 2020, 11:08:14 am »
@dbrdh: If you're running a night build or recent svn version it is best to log this issue in the sf.net tickets section, so it is not forgotten. This is a problem with the GTK project template. What version of gtk+ are you using?
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline dbrdh

  • Single posting newcomer
  • *
  • Posts: 3
Re: Code::Blocks and Raspberry Pi 4
« Reply #3 on: January 05, 2020, 02:57:26 pm »
Thanks for the reply...

Do you know the difference between error and warning?

yep. Now you've reminded me! :-)

Where is Code::Blocks installed? Edit2: On RP4 or other computer
What version is Code::Blocks?
What compiler are you using?
What is the Compiler version?

C::B is on the Pi v17.12
GCC v.8.3.0.

Edit: Add link on reporting issue
http://wiki.codeblocks.org/index.php?title=FAQ-Compiling_%28general%29#Q:_How_do_I_report_a_compilation_problem_on_the_forums.3F

Thanks for this. I'm new to programming in Linux and new to the Pi - I have done a fair bit of Basic, VB, C and C++ but a long time ago - that helped with sorting the missing libraries. Maybe I'm being a real Noob but I was expecting, perhaps naively, just to compile and run a simple GUI 'Hello world' app without too much [any?] input. However, when this new to a platform/app/environment, it's difficult to know what are noob issues and what is a genuine issue! 8-)

Still reading up - a lot! 8-)

Sorted my initial issue and am ignoring the warnings. Having sorted out missing libraries, now have new errors relating to undefined references. I know what these are but they seem extensive and relate to the window construction/size/position so perhaps I'll post using info from link you supplied.

Thanks again,

Dave
« Last Edit: January 05, 2020, 03:13:11 pm by dbrdh »

Offline dbrdh

  • Single posting newcomer
  • *
  • Posts: 3
Re: Code::Blocks and Raspberry Pi 4
« Reply #4 on: January 05, 2020, 03:10:59 pm »
Thanks for the reply...

@dbrdh: If you're running a night build or recent svn version it is best to log this issue in the sf.net tickets section, so it is not forgotten. This is a problem with the GTK project template. What version of gtk+ are you using?

Noted.

GTK+ 3.0 version: 3.24.5-1+rpt2  armhf 

Sorted the initial issue but as you may have seen in my other reply, I now have 'undefined reference' errors relating to GUI window construction. This seems to fit with what you say about a template issue. Its tripping up on things like undefined border setting and window position.

Is the section you referenced above the right place for this?

Cheers,

Dave

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 12595
    • Travis build status
Re: Code::Blocks and Raspberry Pi 4
« Reply #5 on: January 05, 2020, 04:52:27 pm »
Is the section you referenced above the right place for this?
Most probably it is.
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Online stahta01

  • Lives here!
  • ****
  • Posts: 6895
    • My Best Post
Re: Code::Blocks and Raspberry Pi 4
« Reply #6 on: January 05, 2020, 10:39:03 pm »
FYI: Just looked at the wizard and it looks like it only support GTK version 2 under Windows.
Edit: And, that version seems to be the only one supported under other OSes.

Tim S.
« Last Edit: January 05, 2020, 10:43:06 pm by stahta01 »
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 32 bit.
On Debian Stretch, compiling CB Trunk against wxWidgets 3.0.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org