Skip to main content

SETTING UP A C IDE

C-Language

The C programming language is one of the most popular and widely used programming languages. It is a general-purpose programming language and there are very few computer systems in existence that are not set up for its use (i.e. where a C compiler does not exist).

Here will see how to set up a C IDE.

ON WINDOWS

Dev C++ is an open source C/C++ compiler that is one of the most user friendly and effective development environment and compiler. It can be downloaded from source forge or from bloodshed.

• Download the setup file from any of the above links or from somewhere it is feasile.

• Install it and open the IDE. Click on 'New project' from the menu File to the top left.

•Type in your code. Next comes the task of saving the source code in c source format. Give it a name and from the drop down menu which appeares in the save window select 'c source file' and then click save.

•After saving, click on the compile button from the menu or press F9. If there are no syntax errors in your code, the program will be compiled amd will be set ready for execution.

•To execute it click on 'Run' or press 'Ctrl+F10'. It is done for now.

ON LINUX

Linux based distributions like ubuntu, kali etc usually come pre installed with GCC(GNU Compiler Collection). It is used for compiling C/C++ source codes. To check if your Linux has gcc installed, type in the Terminal,
gcc -v

If yes, it will gove you details about your version and so on. Else you can follow the method given to get it installed. Type the commands corresponding to your Linux distribution.

On CentOS/Redhat
yum install gcc gcc-c++ autoconf automake

On Debian
sudo apt-get install build-essential

Now you have the compiler installed. One aother method is to install 'Wine' which is a software in Linuxbwhich enables Windows applications to be run on it.

If you are using a 64-bit Architecture, then enable 32-bit for better compatibility
sudo dpkg --add-architecture i386

Add the repository: sudo add-apt-repository ppa:wine/wine-builds

Update your Repositories: sudo apt update

Then install the version of Wine you wish to use:

Based on Wine Development (Testing Stage) (eg: 1.9) - sudo apt install wine-devel

Based on Wine-Staging (Bleeding Edge) (eg: 1.9.1) - sudo apt install wine-staging

Lastly run:
export WINEARCH=win32 andwinecfg in the terminal to make sure it configures Wine correctly (In that order). You will also need to install winetricks (Another configuration package, really helpful for installing Windows components like .NET Framework and other needed libraries). So after this, please do:sudo apt install winetricks

Alright. No let us see how to run a c program on Linux.

• First of all open any text editor and type in your source code and save it to a directory(let us take Desktop) with the extension .c

• Then, open Terminal(Ctrl+Shift+T or from the appilcation menu). Change the workind directory to the location where you have saved the program. Since here it is Desktop, type:

cd Desktop/

• Again type gcc [<program_name.c>] This will compile the source code and if there are any errors in the code, error messages will be displayed in the screen. Else a new executable file will be generated in the same directory where you are working now with an extension .out .

• If the program was compiled successfully then type ./<executable_program_name>.out 

That's all.

Hope it worked.

Comments

Popular posts from this blog

SNIFF GSM USING HACKRFX

​TOOLS  USED: •  ha ckrf_kali • brategnuradio-companion • gr-gsmgqrx • wireshark INSTALL REQUIREMENTS: First thing, you want to make sure you have all the required software installed, you can install most of them and their dependencies using your distribution package manager. Let’s start with the libraries and tools for the hackrf itself, on a Debian/Ubuntu distro you’ll install them like so: sudo  apt-get install  hackrf   libhackrf -dev libhackrf0 Once these libraries are installed, you can plug your hackrf into one of your USB ports and execute the  hackrf_info  command, at this point you should see something like the following: # hackrf_info Found  HackRF  board. Board ID Number: 2 ( HackRF  One) Firmware Version: 2014.08.1 Part ID Number: 0x00574746 0x00574746 Serial Number: 0x00000000 0x00000000 0x14d463dc 0x2f4339e1 You will now install  gnuradio  which is the software we’ll use to decode the RF signals,...

MORE ABOUT RANSOMWARES. PART 1

 Not long ago, a man committed suicide after an automatically generated notice from a computer virus threatened him with jail unless he paid a ransom thousands of dollars. The year was 2014. As incredible as the story seems, it marked the first known time a computer virus actually killed somebody. The next generations stole cash from users around the globe, and Cryptolocker raised the stakes – holding data of hundreds of thousands of users hostage. Despite successive short-lived take downs, the malware has made a comeback as CTB (Curve-Tor-Bitcoin) Locker. This challenging breed of malware is continuously improving, reaching new levels of complexity as smartphones and tablets are increasingly used to store crucial personal and enterprise-level documents. Bitdefender, the anti-malware solutions provider, zooms in on the subject to show how this type of virus works and to tell users how to prevent being locked out and extorted. What is ransomware? Ransomware is a type of malware th...

SHE, HE TOLD ABOUT

Her handwriting was so beautiful. Each letter had it's own boldness, elegance and I loved to look at them. A pen and a white space, even in a notice, was enough for her to begin. She would write and then look at it, enjoys it's beauty, goes into a serious thought and ends with a small smile. Every of those sequential actions I remember. It is so normal, universal and a must go reality that time moves foreward. Ages, days, hours, everything passes. My happiness on seeing those fonts kept on changing its demensions. My skin began to paint itself lines and so do she. Still, she wrote. But now there is a difference. As timestamps move, the interpretations made by my brain on those texts perplexed from simple happiness to pride, then to a feeling of belongingness, to love, to possessiveness, to responsibility to trust, to many other emotions for which I am weak in English to find words to substitute for and finally to a fear; a fear of death. Wrong. Perfectly wrong. Its not fear. ...