User avatar
Lycan_Ratchet
Posts: 6
Joined: Wed Dec 26, 2012 12:28 am

Good C++ IDE for Debian/RPi?

Wed Dec 26, 2012 1:55 am

Hello everyone (Happy Holidays too),

I'm familiar with C++ first and foremost, I've dabbled with Python but I'd prefer to stick with what I know. My question is, is there a C++ IDE/Compiler for Debian/RPi? Preferably with a comprehensive library that can reach down to the low-level gpios, audio out and LCD?

If not, then would Python be a good replacement that has such capabilities?

Thanks,
Lycan

xacobe97
Posts: 7
Joined: Mon Dec 24, 2012 9:16 pm

Re: Good C++ IDE for Debian/RPi?

Wed Dec 26, 2012 2:19 am

As IDE you can use CodeBlocks, i think it's avaiable at PiStore. It has compiler included, and a lot of features, i love it :3

>If not, then would Python be a good replacement that has such capabilities?

Nope, cpp is more oriented to that. I hope this result helpful :3

User avatar
Lycan_Ratchet
Posts: 6
Joined: Wed Dec 26, 2012 12:28 am

Re: Good C++ IDE for Debian/RPi?

Wed Dec 26, 2012 3:55 am

Oh my lord. CodeBlocks is available? I am saved (Its my main IDE on my laptop hehe)

Thank you

pjc123
Posts: 913
Joined: Thu Mar 29, 2012 3:37 pm
Contact: Website

Re: Good C++ IDE for Debian/RPi?

Wed Dec 26, 2012 12:21 pm

I can confirm that CodeBlocks installs without a glitch, although I never used it, other than starting it up to make sure it works. Eventually I will try it, but I just use vi for now.
My Raspberry Pi Project Page:
https://www.flaminghellmet.com/launch/

User avatar
[email protected]
Posts: 2020
Joined: Tue Feb 07, 2012 2:14 pm
Location: Devon, UK
Contact: Website

Re: Good C++ IDE for Debian/RPi?

Wed Dec 26, 2012 4:16 pm

wiringPi will give you fairly low-level access to the GPIOs, or if you want to twiddle the bits yourself, then just read the source..

As for the audio & video - I'd probably suggest using existing libraries before trying to poke them directly. The SDL library might be a good place to start.

-Gordon
--
Gordons projects: https://projects.drogon.net/

zippy54
Posts: 3
Joined: Tue Dec 25, 2012 10:34 pm

Re: Good C++ IDE for Debian/RPi?

Thu Dec 27, 2012 1:23 pm

VIM.

User avatar
[email protected]
Posts: 2020
Joined: Tue Feb 07, 2012 2:14 pm
Location: Devon, UK
Contact: Website

Re: Good C++ IDE for Debian/RPi?

Thu Dec 27, 2012 1:38 pm

zippy54 wrote:VIM.
It's what I use... (+Makefiles, although I've just been introduced to cmake...)

-Gordon
--
Gordons projects: https://projects.drogon.net/

janvb
Posts: 5
Joined: Sat Jul 07, 2012 5:40 pm

Re: Good C++ IDE for Debian/RPi?

Thu Jan 03, 2013 8:57 pm

pjc123 wrote:I can confirm that CodeBlocks installs without a glitch, although I never used it, other than starting it up to make sure it works. Eventually I will try it, but I just use vi for now.
CodeBlocks have worked just fine for a long time, BUT the editor in CodeBlocks are very slow on RaspberryPI for some strange reason. It simply is slow to type.

I have tested QTCreator and the editor there is much faster.

PS1981
Posts: 445
Joined: Wed Dec 12, 2012 4:11 pm

Re: Good C++ IDE for Debian/RPi?

Thu Jan 03, 2013 9:00 pm

I also use QT creator a bit on the Pi, but have not tried using the GPIO's (or any other hardware) with it. Has anybody tried that out? Does it work?

pjc123
Posts: 913
Joined: Thu Mar 29, 2012 3:37 pm
Contact: Website

Re: Good C++ IDE for Debian/RPi?

Fri Jan 04, 2013 12:57 pm

PS1981 wrote:I also use QT creator a bit on the Pi, but have not tried using the GPIO's (or any other hardware) with it. Has anybody tried that out? Does it work?
An IDE (QTcreator CodeBlocks, etc.) has nothing to do with accessing the GPIO's. You can write programs with an IDE, vi, leafpad whatever. All these months have passed and I am still using vi !
My Raspberry Pi Project Page:
https://www.flaminghellmet.com/launch/

PS1981
Posts: 445
Joined: Wed Dec 12, 2012 4:11 pm

Re: Good C++ IDE for Debian/RPi?

Fri Jan 04, 2013 1:46 pm

pjc123 wrote: An IDE (QTcreator CodeBlocks, etc.) has nothing to do with accessing the GPIO's. You can write programs with an IDE, vi, leafpad whatever. All these months have passed and I am still using vi !
I am fully aware that "programs" can be written in many ways including various IDE's or text editors etc, but some IDE´s make more problems than others when for example importing certain libraries. I would like to hear from anyone who has actually created a working QT Gui capable of accessing the GPIO's, (Especially on Raspian Wheezy) and if there are (were) any particular problems faced when doing so. Links to example projects would be interesting.

pjc123
Posts: 913
Joined: Thu Mar 29, 2012 3:37 pm
Contact: Website

Re: Good C++ IDE for Debian/RPi?

Fri Jan 04, 2013 5:23 pm

PS1981 wrote: I am fully aware that "programs" can be written in many ways including various IDE's or text editors etc, but some IDE´s make more problems than others when for example importing certain libraries. I would like to hear from anyone who has actually created a working QT Gui capable of accessing the GPIO's, (Especially on Raspian Wheezy) and if there are (were) any particular problems faced when doing so. Links to example projects would be interesting.
Now I see why you are asking.
My Raspberry Pi Project Page:
https://www.flaminghellmet.com/launch/

pomfei
Posts: 1
Joined: Fri Jan 11, 2013 7:07 am

Re: Good C++ IDE for Debian/RPi?

Fri Jan 11, 2013 2:27 pm

Emacs!!!

User avatar
[email protected]
Posts: 2020
Joined: Tue Feb 07, 2012 2:14 pm
Location: Devon, UK
Contact: Website

Re: Good C++ IDE for Debian/RPi?

Fri Jan 11, 2013 3:12 pm

pomfei wrote:Emacs!!!
Took a while for someone to say it ;-)

-Gordon
--
Gordons projects: https://projects.drogon.net/

pine
Posts: 16
Joined: Sun Jun 24, 2012 8:32 pm

Re: Good C++ IDE for Debian/RPi?

Fri Feb 01, 2013 4:57 pm

@PS1981

I'm relatively new to QtCreator but I'm using it to write C++ code which drives an MCP23017 via I2C. I extracted the driving code from James Henderson's examples (strictly speaking for C) on the Robotic Electronics site. Lots of const char *filename = "/dev/i2c=0" and ioctl stuff, which I think I understand (I'm new to Linux too!) - but my functions work anyway!

You need to set up QtCreator so that the Build and Run routines work properly - I found threads on this forum for doing that but do not have the links.

I'm also looking at Gordon's code (wiringPi) to drive the GPIO pins directly (but with suitable electronic protection - it's why I'm using the MCP). BtW, I've found the I2C very slow for things like PWM. My profiling suggests ~350us per byte written to it's ports which seems a lot for a 100kHz bus - until you factor in how many cycles it needs to write out a byte, then you're in the right ball park.

Hope this helps!

pine
Posts: 16
Joined: Sun Jun 24, 2012 8:32 pm

Re: Good C++ IDE for Debian/RPi?

Fri Feb 01, 2013 5:14 pm

@PS1981

Duh! Just found the thread which gave details on setting up Build & Run in QtCreator. Authored by? You! apologies .........

User avatar
mad-hatter
Posts: 419
Joined: Sun Feb 26, 2012 2:58 pm
Location: By the UK seaside

Re: Good C++ IDE for Debian/RPi?

Fri Feb 01, 2013 7:21 pm

Hello,
@PS1981 wrote:-
I would like to hear from anyone who has actually created a working QT Gui capable of accessing the GPIO's, (Especially on Raspian Wheezy)
Yes, I'm in the middle of playing along those lines with QT4 (Creator)..
I'm using Mike McCauley's BCM2835 , Gorden's WiringPi & GPFSEL_LIST by Kevin Sangeelee.
These are "C" programs but with a few small changes will integrate into "C++" and run fine.
I've done some simple testing using a GUI front end to control LEDS and IO and they are
reasonably quick, but no speed testing or anything complicated yet.
This is on "Wheezy".

Regards

PS1981
Posts: 445
Joined: Wed Dec 12, 2012 4:11 pm

Re: Good C++ IDE for Debian/RPi?

Fri Feb 01, 2013 8:03 pm

Thanks for that, it´s very interesting. When I finally have a bit of time I might get round to it myself... :D

kaspencer
Posts: 86
Joined: Wed Mar 07, 2012 11:37 pm
Location: UK, England, Wiltshire

Re: Good C++ IDE for Debian/RPi?

Sun Feb 03, 2013 2:48 pm

Greetings all ...

I started programming in the C language way back in 1986, and used Zorland/Zortech/Symantec C/C++ extensively to produce commercial programs in the Windows GUI (Chinese proverb says that he who programs in C on Windows reboots often and learns quickly!). It was always C, never C++ because when that became available I had no inclination to convert all my software.

I am very rusty on the language and would like to get going again with the Pi. I have raad about
QT/QT+/QTcreator and GTK+ but I cannot find them for RaspbianWheezy or Debian Wheezy. So can someone point me in the right direction to get hold of one or other of these programming systems?

I should say that I have no experience at all of coding for a GUI interface in Linux, although I did a lot in Windows and years ago on RiscOS with the Acorn C/C++ Development Packages.

All the best,

Ken
2xRPi 1, 2xRPi 2, 2xRPi4.
KODI: on RPi 2.
Webserver: on RPi 2.
PDC & fileserver: 4TB disc +RiscOS Pi on RPi 2 + 4.
Book: All about your computer - http://goo.gl/ZQf7c7

PS1981
Posts: 445
Joined: Wed Dec 12, 2012 4:11 pm

Re: Good C++ IDE for Debian/RPi?

Sun Feb 03, 2013 2:54 pm

Please take a look at this post / discussion between myself and a few forum comrades. I think this will be enough to get you up and running with QT4 on the Raspberry Pi.

http://www.raspberrypi.org/phpBB3/viewt ... 03#p252603

User avatar
mad-hatter
Posts: 419
Joined: Sun Feb 26, 2012 2:58 pm
Location: By the UK seaside

Re: Good C++ IDE for Debian/RPi?

Sun Feb 03, 2013 3:08 pm

Hello,

sudo apt-get install qtcreator

You might want to install synaptic, to get information on some of the qt4 add-ons.

Regards

PS1981
Posts: 445
Joined: Wed Dec 12, 2012 4:11 pm

Re: Good C++ IDE for Debian/RPi?

Sun Feb 03, 2013 3:40 pm

mad-hatter wrote:
sudo apt-get install qtcreator

Regards
This is 100% correct, but please do look ath the other post too, because most people have a problem actually getting the software configured after it is installed. The problem solveing help is in the post linked to above.

kaspencer
Posts: 86
Joined: Wed Mar 07, 2012 11:37 pm
Location: UK, England, Wiltshire

Re: Good C++ IDE for Debian/RPi?

Sun Feb 03, 2013 6:31 pm

Thanks all ...

QTCreator has installed satsfactorily, and thanks to the other posts, I have resolved the initial issues so that I can create both console and GUI apps. Although it takes C code, which is my preference, I suspect that it is quite C++ orientated, which it picked up even though I specified GCC (I have G++ of course anyaway).
It looks hopeful!
Am I right in thinking that this product also works in Windows (64-bit?) because if it does it might be a good competitor to Visual Studio ...

All the best

Ken.
2xRPi 1, 2xRPi 2, 2xRPi4.
KODI: on RPi 2.
Webserver: on RPi 2.
PDC & fileserver: 4TB disc +RiscOS Pi on RPi 2 + 4.
Book: All about your computer - http://goo.gl/ZQf7c7

PS1981
Posts: 445
Joined: Wed Dec 12, 2012 4:11 pm

Re: Good C++ IDE for Debian/RPi?

Sun Feb 03, 2013 7:20 pm

Yes it does work. I to am new to linux, but I've been using QT4 on Windows 7 64 bit for some time now. And yes it is mostly C++ oriented, but is c capable and there's also a python version. I started using QT when I was fed up with the Microsoft Visual software.

twistylists
Posts: 1
Joined: Fri Feb 08, 2013 7:37 pm
Location: Mauston, Wisconsin, USA
Contact: Website

Re: Good C++ IDE for Debian/RPi?

Fri Feb 08, 2013 8:39 pm

Thanks a heap, everyone, for this huge leg-up. It looks like the R..Pi, Model A will be my platform for reverse-engineering a controller for an out-of-support egg hatcher that has a substantial user base with nowhere to go when their boards kak out.
I'm impressed with the quality and focus of this forum.
"Slantnote" Dave Zethmayr
http://brazenbaboon.com (twistylists open-source project)

Return to “C/C++”