BonesJ
Posts: 4
Joined: Wed Dec 30, 2015 3:41 am

Geany in c++11

Wed Dec 30, 2015 4:40 am

I just got a Raspberry Pi and am new to Linux as well. I downloaded Geany and noticed that newer code (c++11) does not work. I've updated everything and when I check my g++ version, it says that it is 4.7.3. I've looked up how to change this in Geany and found out that I had to go to Build -> Set Build Commands -> Build. From there I would enter in

Code: Select all

g++ -std=c++11 -Wall -c "%f"
in the "Compile" box and

Code: Select all

g++ -std=c++11  -Wall -o "%e" "%f"
in the "Build" box. From here I do not know what to do. I can't see an "OK" button nor an "Accept" button. Any Advice? Image

User avatar
RogerW
Posts: 285
Joined: Sat Dec 20, 2014 12:15 pm
Location: London UK

Re: Geany in c++11

Wed Dec 30, 2015 11:42 am

When I do this there are Cancel and OK buttons at the bottom of the Set Build Commands dialog.

User avatar
drgeoffathome
Posts: 9
Joined: Wed Sep 16, 2015 5:00 am

Re: Geany in c++11

Wed Dec 30, 2015 1:39 pm

As an aside, you can get more recent versions of gcc (g++) than 4.7. In a terminal use

Code: Select all

apt-cache search ^gcc-
to figure out what is available.
then you can install whatever you find by

Code: Select all

sudo apt-get install <gcc-someversion>


Cheers,
Geoff

BonesJ
Posts: 4
Joined: Wed Dec 30, 2015 3:41 am

Re: Geany in c++11

Wed Dec 30, 2015 5:16 pm

http://m.imgur.com/Q1Cu4HL Here's a screenshot of my build commands. Do you guys know if there is a way to edit the source code for geany directly to update the g++?

User avatar
RogerW
Posts: 285
Joined: Sat Dec 20, 2014 12:15 pm
Location: London UK

Re: Geany in c++11

Wed Dec 30, 2015 5:40 pm

That does not look like the dialog I get when I select Build/Set Build Commands. Which version of geany are you running. I have 1.24.1. I am running on standard rasbian Jessie and geany came pre installed.

User avatar
Paeryn
Posts: 2680
Joined: Wed Nov 23, 2011 1:10 am
Location: Sheffield, England

Re: Geany in c++11

Wed Dec 30, 2015 8:06 pm

Looks like the bottom of the window is off screen. If you can't move the window to show the bottom you can use the keyboard to select it. First click in the final text box in the bottom right hand corner of the window to put the input focus on it, press TAB 3 times (this will move the input focus to the OK button) and then SPACE to "click" it.

RogerW: It's the build options in the Project Properties rather than the global build options.
She who travels light — forgot something.

BonesJ
Posts: 4
Joined: Wed Dec 30, 2015 3:41 am

Re: Geany in c++11

Thu Dec 31, 2015 12:28 am

Paeryn,
That seemed to do the trick; thanks for the help.

Return to “C/C++”