How to Start Programming in Linux Environment

Slides:



Advertisements
Similar presentations
COP 3530 JDK Environment Variables. COP 3530 JDK Environment Variables Environment Variables Environment variables are a set of dynamic values that can.
Advertisements

Cygwin Linux for Windows Desktop Paul Stuyvesant.
Dayu Zhang 9/8/2014 Lab02. Example of Commands pwd --- show your current directory This is home of venus, not your home directory Tilde: means you are.
Java Programming Working with TextPad. Using TextPad to Work with Java This text editor is designed for working with Java You can download a trial version.
Unix Continuum of Tools Do something once: use the command line Do something many times: –Use an alias –Use a shell script Do something that is complex.
CS115 HOW TO INSTALL THE JAVA DEVELOPMENT KIT (JDK)
Go to the link ( as shown, then choose downloads.
1 Introduction: Unix and C Software Project – Winter 2007 / 2008.
Installing JDK Vijayan Sugumaran Department of DIS Oakland University.
1 Introduction: Unix Software Project – Autumn 2008/2009.
Writing Methods. Create the method Methods, like functions, do something They contain the code that performs the job Methods have two parts.
1 C/C++ Compiling. 2 Outline Surfing websitewww.mcsr.olemiss.edu Logging into the system via ssh Brief History of C/C++ languages.
1 SEEM3460 Tutorial Unix Introduction. 2 Introduction What is Unix? An operation system (OS), similar to Windows, MacOS X Why learn Unix? Greatest Software.
1 C/C++ UM/MCSR. 2 Logging into the system using ssh Logging into the system from Windows: –Start the secure shell client: Start->Programs->SSH.
1 SEEM3460 Tutorial Unix Introduction. 2 Introduction Unix-like system is everywhere Linux Android for smartphones Google Chrome OS for Chromebook Web.
Setting up Eclipse Computer Organization I 1 August 2009 ©2009 McQuain Getting Eclipse for C/C++ Development Go to and click on Download.
CSC 215 : Procedural Programming with C C Compilers.
How to Install and Run Prepared by: Shubhra Kanti Karmaker Santu Lecturer CSE Department BUET.
Vim Editor and Unix Command gcc compiler Computer Networks.
영상레이더 간섭기법 강원대학교 지구물리학과 이훈열 교수 2006 년 2 학기 대학원 강의.
Developing C/C++ applications with the Eclipse CDT David Gallardo.
LINUX Tuesday, 5 July :00 pm. Remote Login l Use Secure Shell (ssh) l Machine name/IP address E.g. ssh hydra.sma.nus.edu.sg Or ssh
Cygwin Linux for Windows Desktop Paul Stuyvesant.
1 Editing a C Program 01/16/15. 2 Objective Use Linux to edit, compile and execute a C program.
Oracle Data Integrator Workflow Management: The Packages.
Active-HDL Interfaces Debugging C Code Course 10.
1 Lab 2 “Hello world” in Unix/Linux #include "std_lib_facilities_4.h" int main(){ cout
Executing a C Program Creating the Program Compilation Linking Execution.
Setting up Cygwin Computer Organization I 1 May 2010 ©2010 McQuain Cygwin: getting the setup tool Free, almost complete UNIX environment emulation.
Created by Harry H. Cheng,  2009 McGraw-Hill, Inc. All rights reserved. C for Engineers and Scientists: An Interpretive Approach Chapter 2: Getting Started.
Installing JDK Vijayan Sugumaran Department of DIS Oakland University.
Java Programming, Second Edition Appendix A Working with Java SDK 1.4.
1 Installing Java on Your PC. Installing Java To develop Java programs on your PC: Install JDK (Java Development Kit) Add the directory where JDK was.
More on Using onyx 8/28/13. Program 1 Due a week from today. See website for details.
1 Getting Started with C++ Part 1 Windows. 2 Objective You will be able to create, compile, and run a very simple C++ program on Windows, using Microsoft.
 Simple UNIX commands  I/O techniques in C++  Solutions to Lab#0 problems  Solutions to Lab#1 problems 1.
Cygwin Tutorial 1. What is Cygwin? Cygwin offers a UNIX like environment on top of MS-Windows. Gives the ability to use familiar UNIX tools without losing.
ECE 544 Software Project 1 Kuo-Chun Huang (KC). Environment Linux (Ubuntu or others) Windows with Cygwin
 CSC 215 : Procedural Programming with C C Compilers.
KYC - Know your compiler Introduction to GCC
Cygwin: getting the setup tool
Precept I : Lab Environment, Unix, Bash, Emacs
Cygwin Tutorial 1.
CSC 215 : Procedural Programming with C
How to Program.
SEEM3460 Tutorial Unix Introduction.
CS1010: Intro Workshop.
Getting Eclipse for C/C++ Development
CDT Build/Run/Debug in Container
Getting started in Eclipse
Linux Programming Environment How to Run Linux in Windows
The Linux Command Line Chapter 12
C Programming Lecture Series
How to install the Enterprise Agent using Active Directory
SEEM3460 Tutorial Unix Introduction Xinshi Lin & Zihao Fu
Govt. Polytechnic,Dhangar
Run Java file with Window cmd
Setting up CDT Makefile project
CS115 HOW TO INSTALL THE JAVA DEVELOPMENT KIT (JDK)
Download and Installation of code::blocks
Cygwin.
Cygwin Tutorial 1.
Software Setup & Validation
Cygwin Tutorial 1.
Getting Eclipse for C/C++ Development
Cygwin: getting the setup tool
Debugging.
Compile and run c files.
The Linux Command Line Chapter 12
Presentation transcript:

How to Start Programming in Linux Environment Dr. Munesh Singh

Install the Compiler Open up the terminal and install vim by entering the following commands. dnf -y update dnf -y install vim-enhanced Install necessary development tools (if not installed already). This includes the compiler. dnf group install 'Development Tools‘ Create a new C/C++ program with this vim command.  vi example.c

Compile the code Press the i key or the insert key to start writing the program. After you have completed the program save and exit vim by typing :wq Esc /:wq #include<stdio.h> int main() {     printf("Hello World\n");   printf("Welcome to Tech Infected\n") return 0; }   Compile cc example.c See the output ./a.out

Setup Linux Environment in Window Install Cygwin https://cygwin.com/install.html

Environmental setup Setup Windows Environment Variables: Open your System Control Panel: Select [start]->Control Panel->System

Environmental Setup… lick on "Advanced System Settings", then select "Environmental Variables"

Setup Environmental Variable Click on "Advanced System Settings", then select "Environmental Variables" under the "Advanced" tab of the "System Properties" Control Panel. Edit "System variable" as follows: Append "; C:\cygwin\bin" to Variable value: (semicolon is very important) Select "Ok" to close both "Environmental Variables" and "System Properties" windows.

Verify CygWin > gcc --version g++ (GCC) 4.8.1 ...... > g++ --version g++ (GCC) 4.8.1 ...... > gdb --version GNU gdb (GDB) 7.6.1

How to install MinGW Goto MinGW mother site at http://www.mingw.org/ Click on  Downloads ⇒ Installer ⇒ click on "mingw-get-inst" link to download the installer.

MinGw…

MinGw.. Set the installation directory. e.g., "d:\myproject\mingw". MinGW Installation Manager, select "Installation" ⇒ "Update Catalogue" ⇒ Select all packages in "Basic Setup" ⇒ continue (Apply). Setup environment variable PATH to include d:\myproject\mingw\bin“ Verify the GCC installation gcc --version

Get Started Compile/Link a Simple C Program - hello.c // hello.c #include <stdio.h> int main() { printf("Hello, world!\n"); return 0; } Compile gcc hello.c Run ./a