Tuesday, May 10, 2011

C(G)++ Compilers in Windows NT – The GNU Way!

When it comes to coding and programming, nothing can beat the linux. It has the most sophisticated compilers out there! Despite this fact, most of the people don’t feel comfortable working with Linux. Although there are certain alternatives and 3rd party softwares for Windows platform, nothing can get near the GNU compilers. They are updated, fast and error-free. So, GNU has given a windows version of its new compiler for download.

These are the steps to be done to get your system running with GNU C++ compiler!

  1. Download the GNU C++ compiler tool (full.exe) here. http://www.claremontmckenna.edu/pages/faculty/alee/g++/full.exe

Check for integrity – SHA1sum - 2266a1cbd63a8a06faf0e44332b678f3f57161aa

  1. Run the full.exe

clip_image002

  1. It’s a normal setup just like anything else. When you’re done installing it, you need to add the path environment variable. We’ve already seen as to how to add the path variable in glomosim installation setup. If you still find it difficult, brush through the glomosim installation setup guide, ( http://ubuntuone.com/p/kXU/ ) point 1 where we have given how to add environment variables for Visual Studio. In this case for G++ compilers, you just need to do it for path variables with the path address, C:\cygnus\cygwin-b20\H-i586-cygwin32\bin with a semicolon – ‘;’.

That is you add it like <previous path addresses>; C:\cygnus\cygwin-b20\H-i586-cygwin32\bin;

  1. For those of you who still find it difficult to add the environment variables, I’ve given a VBScript file that can make things easier for you. Just run it once and your path variables would be added for you. BUT YOU GOTTA RUN THAT ONLY ONCE AND THIS SCRIPT FILE WORKS ONLY FOR THE DEFAULT INSTALLATION DIRECTORY GIVEN BY THE FULL.EXE SETUP. If you install the setup somewhere else, you gotta  tweak the script file. It’s easy, open it through the notepad, look for where the original path has been provided and replace it with that path that you’ve used.

Download the VBScript file here: http://ubuntuone.com/p/sRx/

  1. After setup, go for a system-reboot
  2. You’re done. Now just type, g++ followed by the cpp file path
  3. If yours gets compiled successfully, no errors show up. Else error warning comes up. You gotta manually edit the errors using some text editor.
  4. After compiling, just like how you use . /a.out for the a.out file in linux, you use a.exe to view the output here.This is an other alternate way to produce exe files for your c++ codes.clip_image004
  5. Thanks to the Cygwin project !
  6. Download the instruction manual here : http://ubuntuone.com/p/sS2/

Monday, May 2, 2011

Common Misconceptions–Yum vs. Apt. Getting things right !

Yellowdog Updater, Modified (also known as YUM) is a command line package management utility –meaning that through a command window, it automates the installation, upgrade, configuration, and removal of software packages from a computer. It is an open source utility, making available to all administrators on a network. There are several tools that enhance the command line interface of YUM with graphical user interfaces –making its functionality better.

Aptitude as an Advanced Packaging Tool (or an APT) that displays software packages and gives the user the ability to pick the packages they wish to install or remove from their computer. Aptitude comes complete with a powerful search system which makes use of flexibility search patterns. It is based mostly on the ncurses computer terminal library –a programming library that provides an API and gives the programmer the power to write a text user interface without the use of a terminal.

YUM is a complete overhaul of its predecessor, Yellowdog Updater (also known as YUP). It was conceived as a means of updating and managing Red Hat Linux systems and has since inception been adopted by Red Hat Enterprise Linux, Fedora, CentOS, and many other Linux distributions that are all RPM based. The YUM utility synchronises remote metadata to the local client without being prompted to do so. Thusly, YUM is incapable of failing if the user fails to run a command at the interval that particular command requires.

Aptitude comes standard with a command line interface (or CLI), similar to the apt- family of tools (Advanced Packaging Tool, which works with the core libraries in order to execute installation and removal of software). Unlike many other APIs, Aptitude does not require root privileges in order to run. It, instead, shows a prompt to Become Root in the event that those rights are deemed necessary. When Aptitude opens it suggests a threaded list of packages that can be navigated using the arrow keys and the enter key to open and collapse nodes.

YUM also uses a separate tool in order to set up its own repositories. This tool is known as createrepo and generates the necessary XML metadata –as well as the splite metadata if the option -d is selected) necessary to create the YUM repositories. The tool known as Å“mrepo aids in the creation and maintenance of the YUM repositories.

Summary:

1. YUM is a command line package management utility that manages the installation, upgrade, configuration, and removal of software packages; Aptitude as an APT that displays software packages and gives the user the power to choose which programs she wishes to install or remove.

2. YUM automatically synchronises remote metadata to the local client without needing a prompt; Aptitude has a command line interface that executes installation and removal of software without the need of root privileges.

source: http://www.differencebetween.net/technology/difference-between-yum-and-aptitude/