Introduction
Linux
Today Linux has joined the desktop market. There are more than 29 million Linux users on an average and thousands of distributions available. Linux developers concentrated on networking and services in the beginning, and office applications have been the last barrier to be taken down. Today with OpenOffice.org 2.0 goes gold, Firefox exceeding 100 million downloads in one year, ASF (Apache), Ubuntu projects and support for rich multimedia on Desktops, strong backup by IBM, HP, Sun, Novell, Sony, Red Hat, etc., Linux is attaining new limits in the industry.
On the server side, Linux is well-known as a stable and reliable platform, providing database and trading services for companies like Amazon, the well-known online bookshop, US Post Office, the German army and such. Especially Internet providers and Internet service providers have grown fond of Linux as firewall, proxy- and web server, and you will find a Linux box within reach of every UNIX system administrator who appreciates a comfortable management station. Clusters of Linux machines are used in the creation of movies such as "Titanic", "Shrek" and others. In post offices, they are the nerve centers that route mail and in large search engine, clusters are used to perform internet searches. Call centers have a significant appetite for Linux, as does Government, Health Care and major manufacturing. These are only a few of the thousands of heavy-duty jobs that Linux is performing day-to-day across the world.
It is also worth to note that modern Linux not only runs on workstations, mid- and high-end servers, but also on "gadgets" like PDA's, mobiles, a shipload of embedded applications and even on experimental wristwatches. This makes Linux the only operating system in the world covering such a wide range of hardware.
Getting Started
- http://www2.cs.uregina.ca/~pwlfong/CS170/Tutorials/compile.html
- http://www.ghodechhap.net/C%20Programming%20on%20Linux.pdf
- http://www.cs.ucr.edu/~mfast/linux_tutorial.html
- http://www.mizi.com/developer/mz20/docs/kdevelop_tutorial_en_rev1.1.pdf
Now download the wxGTK-2.6.3 and copy it into a folder say 'devel' then open the terminal window and move to that folder and issue the following commands:
mkdir buildStaticGTK
cd buildStaticGTK
../configure --with-gtk -disable-shared
make
su <type root password>
make install
ldconfig
wxconfig --libs
g++ -o hello hello.o `wx-config --libs`
./hello
Congrats again! You have successfully compiled wxWidgets Hello World on Linux, if you have any problem, try to replace the `wx-config --cxxflags` and `wx-config --libs` with the output you get earlier on command promt, also note that the symbol around wx-config -cxxflags, is not inverted comma but apostrophe. If that works, just copy the wx-config link in the buildStaticGTK directory to the /usr/bin directory.
wxWidgets with KDevelop:
-
Type kdevelop in the terminal and in the 'Project' Menu of KDevelop
select 'New Project...'. Select 'C++ » wxWidgets » Simple Hello wxWidgets application'. Choose an appropriate application name and location.
-
Change the author name and set the contact email address, you may also choose an appropriate license.
-
Change the license text to be displayed in the source files for '.h' and '.cpp' files if needed, and select finish.
-
This will create a simple wxWidgets application in the provided directory. Select OK.
-
Select 'Project Options...' from the 'Project' menu. Select 'Configure Options' in the left panel from the project options dialog box. In the 'Linker flags (LDFLAGS)' in 'General' tab write $(wx-config --libs).
-
In the 'Compiler flags (CXXFLAGS)' in 'C++' tab, change the value to $(wx-config --cxxflags).
-
You may repeat the above two steps for linker and compiler flags for 'release' configuration also. Then select 'OK', and it will ask to Re-run configure for the project. Select 'Yes'.
-
Then from the 'Build' menu select 'Build Project'. It will ask to Run automake & friends and configure first. Select 'Yes'.
-
Wait for a minute, then from the 'Debug' menu select 'Start'. And you are finished with building wxWidgets applications with KDevelop for Linux.
-
Congrats! Now can modify the source files generated by the wizard and try experimenting. Happy Programming!:)
Special Thanks
- Mahr - For his valuable guidance on getting started with Linux.
-
Dominik Reichl - For modifying the images clearity.