I am thinking of installing Ubuntu on my laptop, and I am curious as if there is a IDE, SDK, etc for making Linux applications, or if there is not, how do you go about making a Linux application? Please help. Thanks.
I am thinking of installing Ubuntu on my laptop, and I am curious as if there is a IDE, SDK, etc for making Linux applications, or if there is not, how do you go about making a Linux application? Please help. Thanks.
Not that I know of. But you don't need any special IDE, just use an editor and develop a program in your language and then create front end with a program like Glade.
Constructive lurker
I already answered you:
create front end with a program like Glade![]()
Constructive lurker
Java
PyGTK
Glade interface designer
Whole lot of other options as well. Depends on what you are comfortable with.
Ubuntu guide: Feisty | Edgy | Dapper
Read/Write NTFS partitions | Remote login from Windows | Extend Nautilus
A newer version of this posting is available here: http://ubuntuforums.org/showthread.p...18#post3627418 <--- Go there
--------------------------------------------------------
The old one:
The Code::Blocks IDE is a superb developer studio for C/C++ programming. See http://codeblocks.org
I recommend that you use the wxWidgets library for GUI programming. WxWidgets is excellent, portable and easy-to-learn GUI kit.
Study: http://www.wxwidgets.org/
Code::Blocks itself is programmed with wxWidgets.
This is howto install Code::Blocks IDE on Ubuntu Linux 7.04.
Do this:
0) First, install some necessities. Issue these commands on the command line. (do not write the $ sign. It just denotes the command prompt).
$ sudo apt-get install build-essential gdb subversion
$ sudo apt-get install automake autoconf libtool
$ sudo apt-get install libgtk2.0-dev libxmu-dev libxxf86vm-dev
I recommend that you move straight to wWidgets version 2.8. The wxWidgets 2.6 is already 'history'.
$ sudo apt-get install libwxbase2.8-dev libwxgtk2.8-dev wx2.8-doc wx2.8-examples wx2.8-headers wx2.8-i18n libwxbase2.8-dbg
$ sudo ldconfig
Goto step 2 if you run Ubuntu 7.10 (Gutsy Gibbon).
If you run Ubuntu 6.10(Edgy) or 7.04(feisty) then
};{
1) Upgrade wxWidgets to version 2.8.4.
Ubuntu comes with outdated version (v2.8.1) of wxWidgets. wxWidgets 2.8.1 is not good enough. You must upgrade it to wxWidgets 2.8.4.
v2.8.4 fixes also some annoying bugs.
Add the following line into your /etc/apt/sources.list file. This should work on both x86 32 bits and 64 bits systems.
Eg. you can edit /etc/apt/sources.list file with nano, gedit or kate editors. I employ the gedit editor here:deb http://apt.tt-solutions.com/ubuntu/ feisty main
$ sudo gedit /etc/apt/sources.list
Replace the word "feisty" with "edgy" if you run Ubuntu 6.10.
Notice: The upcoming Ubuntu 7.10 (alias Gutsy Gibbon, to be relased in october 2007) comes with wxWidgets v2.8.4 out of the box.
Save the file and run the commands (All packages are security signed with a key. This imports the repo key to your machine. Approved).
$ wget http://www.tt-solutions.com/vz/key.asc
$ sudo apt-key add key.asc
$ sudo apt-get update
An alternative guide for step 1: The official guide on wxWidgets' site has also good instructions for Ubuntu 7.04
See: http://www.wxwidgets.org/downloads/#latest_stable ...under the Binaries section.
2) Start the Synaptic Package Manager and Install / Upgrade all wxWidgets (v2.8 ) packages you can find, or just issue these commands:
$ sudo apt-get update
$ sudo apt-get dist-upgrade
Then set wxWidgets v2.8 as the default version. Enter a correct number. I normally select "gtk2-unicode-release-2.8" version.
$ sudo update-alternatives --config wx-config
You can check this setting by running
$ wx-config --version --selected-config
3) The actual installation of Code::Blocks IDE.
3a) Browse to the http://forums.codeblocks.org/index.php/board,20.0.html site.
3b) Choose the most recent nightly build page (by date) and clik on the on the tar.gz file name for Ubuntu 7.04. It is a compressed file that contains several
ready-made .deb packages for Ubuntu 6.10 and 7.04. The file name looks like this: "....._Ubuntu6.10+7.04_wx2.8.4.tar.gz". Click on that file name and it will take you to the download site.
Note: Not all nightly builds produce a new tar.gz package for Ubuntu, so take the most recent tar.gz file (by date) you can find. That's ok.
3c) Now start the actual download from the BerliOS's site by clicking on the download link.
3d) Open the tar.gz file in Ubuntu's Archive Manager as shown in picture 3d....
3e) And unzip the files to an empty directory in your $HOME folder. If necessary, create a new, empty directory under your home or Desktop folder. See picture 3e....
3f) Now start the command line terminal from the Applications -> Accessories -> Terminal menu in GNOME. (In KDE, start the Konsole application from the menu).
And cd to your download folder. An example:
$ cd $HOME/Desktop/download
3g) And install the .deb files by issuing this command
$ sudo dpkg -i *deb
Of course, you can install the .deb packages by clicking on them in the Nautilus or Konqueror file managers. And that's it !
4) Run & test it. Issue the command
$ codeblocks
At the first start, select "GNU GCC compiler" from the list.
Where,in which directory the install script put the codeblocks executable?
$ which codeblocks
Create an icon and put it on the desktop or toolbar. Enjoy !
If you are lazy then run the following command to create a shortcut icon on your Desktop:
$ sudo ln -s /usr/share/applications/codeblocks.desktop $HOME/Desktop
Code::Blocks has several project wizards that makes it easy to start with GUI coding.
Try eg. the menu selection: File -> New -> Project -> wxWidgets project. Select wxWidgets version v2.8. Compile and run.
5) Update your Code::Blocks frequently.
Download and install new, updated tar.gz file (= .deb packages) from http://forums.codeblocks.orgl site, as you did in the step 3) above.
And if the installment fails then take a look at this guide,,,,
---------------------------------------------------------------------------------------------------------
Important notes.
Uns comentários importantes.
Note 1:
If you want to develope OpenGL (glut) applications, install FreeGlut first
$ sudo apt-get install freeglut3 freeglut3-dev
An important tip: Say: /usr when it asks "Please, Select GLUT's location:" in the Code::Blocks' glut-wizard (project wizard).
Read also the Note 2 below.
------------------------------
Note 2 !:
If you want to develope GLFW applications, install GLFW first ( http://glfw.sourceforge.net/ )
------------------------------
Note 3 , c-cpp-reference:
Do not forget to install the "c-cpp-reference" manuals. Run this command:
$ sudo apt-get install c-cpp-reference
OR use your Synaptic Package Manager and get the package. It will put some HTML help files in the /usr/share/doc/c-cpp-reference/ directory.
Start Firefox and point it to /usr/share/doc/c-cpp-reference/index.html
Also these web C/C++ sites are very helpful:
http://www.cppreference.com/
+
http://www.cplusplus.com
+
http://www.yolinux.com/TUTORIALS/LinuxTutorialC++.html
--------------------------------------------------------------
Note 4 , <nothing so far>
--------------------------------------------------------------
Note 5 , Important GLUT / OpenGL guides:
Redbook.html
( Redbook.... [ direct link... ] )
Bluebook.html [ direct link... ]
http://www.opengl.org/code/category/C19/
http://nehe.gamedev.net/
http://ubuntuforums.org/showthread.php?t=333867#8 Especially good source of programming guides !
http://www.gamedev.net ( example: how to run the lessons... )
http://www.glprogramming.com
OpenGL Font library
http://homepages.paradise.net.nz/henryj/code/#FTGL
http://www.libsdl.org Simple Direct Media Layer (Excellent 2D library. Has also OpenGL support )
http://lazyfoo.net/SDL_tutorials/index.php
or try
http://g2.sourceforge.net/
---
GLUI = OpenGL based GUI library (buttons, edit boxes, list boxes etc...)
http://glui.sourceforge.net/
--------------------------------------------------------------
Note 6 , wxWidgets examples !
WxWidgets examples are installed in /usr/share/doc/wx2.6-examples/examples/ OR /usr/share/doc/wx2.8-examples/examples/ directories.
Use the "unpack_examples.sh" script (in the same directory) to unpack the samples in to your $HOME directory.
For example, run:
$ /usr/share/doc/wx2.8-examples/examples/unpack_examples.sh $HOME/wxwidgets2.8
And it will unpack & put the samples in to $HOME/wxwidgets2.8/samples/ folder.
You can compile and run the examples directly from the command line.
As an example let's compile the /popup sample code.
$ cd $HOME/wxwidgets2.8/samples/popup/
Compile the project.
$ make
Run it
$ ./popup
./ means the current directory. Yu must include it, otherwise the shell will not find the program, because by default, the current directory is NOT in the $PATH.
$ echo $PATH
Study and compile all the wxWidgets' examples.
--------------------------------------------------------------
Note 7 , Other important programming resources: http://www.futuredesktop.org/opportunities.html
--------------------------------------------------------------
Note 8 , Essential manual pages... that we developers often forget to install and use.
What manual pages does Ubuntu (or any other distro) offer?
$ apt-cache search manpages
...
manpages - Manual pages about using a GNU/Linux system
manpages-dev - Manual pages about using GNU/Linux for development
manpages-posix - Manual pages about using POSIX system
manpages-posix-dev - Manual pages about using a POSIX system for development
Install all manpages*dev packages
$ sudo apt-get install manpages-dev manpages-posix-dev
Note: This command vill tell you what manual sections (1 - 8 ) the package covers.
$ apt-cache show manpages-posix-dev
Now search help:
$ man 3 fprintf
$ man sqrt
$ man pthread_create
$ man sem_init
$ man 7 pthreads
$ man 7 sem_overview
Use also whatis and apropos commands (eg. to reveal the section number)
$ whatis pthread_create
$ apropos pthread_create
$ apropos pthread
--------------------------------------------------------------
Note 9 , "How to become a real hacker" by Eric S. Raymond, updated 2007 version.
http://www.catb.org/~esr/faqs/hacker-howto.html
--------------------------------------------------------------
Note 10 , A tip for zooming text in Code::Blocks IDE.
Press CNTR + NUMPAD + or NUMPAD - keys to zoom the text.
NUMPAD +/- are tangents on the numerical keypad.
--------------------------------------------------------------
Note 11 ,
Windows converts, read this: http://ubuntuforums.org/showthread.php?t=554070
Last edited by moma; October 26th, 2007 at 02:35 PM.
Python + PyGTK is very, very, very popular right now.
If you choose this language I would recommend Glade for the creation of the user interface and Eclipse with the pydev plugin to write the code.
Linux apps are written in many different languages. Ubuntu (as Linux distro) integrates selected apps as written by upstream developers.
For own development, Ubuntu strongly prefers Python.
Before you start your own project, I would *strongly* recommend joining some existing projects (any of interest to you) to learn the ropes first.
Thanks for the howto moma...thanks!! I am going to have to learn how to upgrade the wx thing that codeblocks relies on, but i have never found any decent instructions on how to do it until now. Worked first time. Thanks again.![]()
Bookmarks