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,  gqrx  a tool to visualize signal power on certain frequencies

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

TERMINAL ON ANDROID- TERMUX

Let Termux be our topic today. It is an Android application which is a Terminal Emulator distributed by Fredrik Fornwall. It creates exactly the same working environment of Linux Terminal on Android. Take a try. It can be installed from Google Play Store. Navigate from here . After the environment is set, go to App settings from the System Settings and give the App Storage permission.  Basic linux command like cd, ls, pwd, cat, touch and many more or almost all can be made here on this prompt. To install packages like Python or Pip type in packages install <packageName> It's that simple.  Similarly, to execute a program or a package, type <packageName> then, the corresponding help will be appear. Rest is with you. This is how an installation screen appears to be.. Now, about storage. As the initial step, type in termux-setup-storage Typing pwd gives the current working directory and it will be something like /data/data/com.termux/files/