Tech Notes, Tips & Reviews

Setting up a C++ Development Environment on the Pandora

Jun 242010

undefinedI wanted to set up the Pandora so I could develop C++ programs directly on the unit rather than using a cross compiler.  I am also installing the SDL & OpenGL ES libraries. Until a PND package is produced this is what I have done to install the development libraries. You need to use a terminal to issue the following commands and then either issue these commands prefixed by sudo or login as root using su.

opkg update

Update is important to do first to make sure the package lists are up to date. Under no circumstances do a opkg upgrade, trust me on this. If you do be ready to do a firmware re-flash.

opkg install gcc gcc-symlinks gcc-doc make make-dev binutils-dev
opkg install cpp cpp-symlinks
opkg install g++ g++-symlinks libstdc++-dev
opkg install libgles-omap3-dev
opkg install libsdl-1.2-dev libsdl-gfx-dev libsdl-image-1.2-dev libsdl-net-1.2-dev libsdl-ttf-2.0-dev

OK, this is the tricky one, OpenPandora have patched the libsdl-mixer library, so there is no equivalent -dev library, for the mean time I am forcing the installation of the Angstrom library, you will notice the nodeps flag. So far I haven't seen any problems with doing this, your mileage may vary. I will be coding an application that uses sound (portable music player) so we'll see how it goes.

opkg nodeps install libsdl-mixer-1.2-dev

You can write your code using nano or vi in the console or use the GUI application Mousepad. I suggest creating a directory for programming on your SD card. Then in a console you can compile and run your applications. In a follow up post I will show how to write a Hello World program on the Pandora using some SDL and C++.

Have Fun :)

Comments

Wondering23 May, 2011Any follow up on the hello world tut?
Bill24 May, 2011Hi Wondering, Oops, I`ve been busy on MinAmp, I will try to put something up when I get some time. Hopefully not too long.

New comment