Linux Night brought to you by

27
Linux Night brought to you by

description

Linux Night brought to you by. Why are you here?. Hopefully to learn I do not claim to be a Linux expert one bit.. I wish I am here to inspire you to broaden your horizons I want you to feel familiar with Linux so you hopefully write some “free” code - PowerPoint PPT Presentation

Transcript of Linux Night brought to you by

Page 1: Linux  Night  brought to you by

Linux Night brought to you by

Page 2: Linux  Night  brought to you by

Why are you here? Hopefully to learn I do not claim to be a Linux expert one bit.. I wish I am here to inspire you to broaden your

horizons I want you to feel familiar with Linux so you

hopefully write some “free” code What you should learn? Absolutely Nothing!

Unless you go outside of this room.

Page 3: Linux  Night  brought to you by

Who has only used Windows? Why? (hint: Your parents) Windows has Market share

Page 4: Linux  Night  brought to you by

Which Linux is right for me?

Page 5: Linux  Night  brought to you by

Brief History of Unix

Page 6: Linux  Night  brought to you by

History of Linux Linux History Chart:

http://www.levenez.com/unix/unix.pdf Linus Torvalds October 1991 The Unix operating system was conceived and

implemented in 1969 at AT&T's Bell Laboratories in the United States by Ken Thompson, Dennis Ritchie, Douglas McIlroy, and Joe Ossanna.

The GNU project, started in 1983 by Richard Stallman wanted a free version of Unix (Bell Labs)

Page 7: Linux  Night  brought to you by

Why make the switch to linux? Linux is Free Software repositories Live CDs/USB’s Community support/non commercial more than 90% of today's 500 fastest

supercomputers run some variant of Linux,[16] including the 10 fastest.

Page 8: Linux  Night  brought to you by

Linux is Free Companies license the software to

businesses and sell their support for a fee so the desktop versions are free (Canonical, Red Hat)

Open source, anyone can rewrite the kernel if you are so inclined

Page 9: Linux  Night  brought to you by

Software repositories -All “safe” software has been added. Debian, Ubuntu, Other APT based systems:

sudo apt-get install <whatever you want> Fedora, SUSE, Mandriva, RHEL, Other RPM

based systems: yum install <whatever you want>

Installing, updating and removing software in Linux is typically done through the use of package managers such as the Synaptic Package Manager, PackageKit, and Yum Extender

Page 10: Linux  Night  brought to you by
Page 11: Linux  Night  brought to you by

How I got eclipse

Page 12: Linux  Night  brought to you by

How do I get stuff I can’t find in the software center?

Page 13: Linux  Night  brought to you by

Live CD’s/USB’s Boot straight from a CD or USB drive Take it anywhere and still have all of

your features Drivers are supported directly at the

kernel level so it is incredibly portable Can even be installed simultaneously

with other installations

Page 14: Linux  Night  brought to you by

Community support/non-commercial Lots of software developers across the world use

it and they will help you with your problems There isn’t a commercial deadline or politics to

get in the way of releasing You can use any combinations of software you

like It is naturally more secure than Windows and

because it is less mainstream people do not target the OS as much

All of the software in the repo is verified prior to being made available

Page 15: Linux  Night  brought to you by

Customizable Any Distro Any Layout Tons of software to choose from Multiple Desktops Blah blah blah

Page 16: Linux  Night  brought to you by

Terms I couldn’t slip in anywhere else… GCC (GNU Compiler Collection) GNU GRUB ( Grand Unified

Bootloader) Wine (WINdows Emulator or Wine Is Not an Emulator)

Page 19: Linux  Night  brought to you by

Setting Up

Wrong!!!

Page 20: Linux  Night  brought to you by

Need the Dev tools…

Help->Check For Updates

Help->Install New Software

Page 21: Linux  Night  brought to you by

Then we can make a fancy Project

Page 22: Linux  Night  brought to you by

Main.cpp #include <iostream> #include "mine.h"

int main() { int myint = 1; for (int i = 0; i <100; i++) { myint = i + myint * 2; std::cout << myint << " "; }

mine newObject;

std::cout << std::endl << newObject.getSome(); std::cout << " MyInt = " << newObject.getmyint(); std::cout << " Increment Ret Val = " << newObject.increment(5); std::cout << " MyInt2 = "<< newObject.getmyint(); return 0; }

Page 23: Linux  Night  brought to you by

Mine.h #pragma once

#include <string> #include <iostream>

class mine { private: int myint; std::string caos; public: mine() { myint = 0; caos = "start some"; }

void helloWorld(){std::cout << "Hello World";}int increment(int incVal){myint += incVal;return (myint);}std::string getSome(){return caos;}int getmyint(){return myint;}};

Page 24: Linux  Night  brought to you by

Eclipse Generated makefile

######################################### # Automatically-generated file. Do not edit! ############################################

-include ../makefile.init

RM := rm -rf

# All of the sources participating in the build are defined here -include sources.mk -include subdir.mk -include objects.mk

ifneq ($(MAKECMDGOALS),clean) ifneq ($(strip $(C++_DEPS)),) -include $(C++_DEPS) endif ifneq ($(strip $(C_DEPS)),) -include $(C_DEPS) endif ifneq ($(strip $(CC_DEPS)),) -include $(CC_DEPS) endif ifneq ($(strip $(CPP_DEPS)),) -include $(CPP_DEPS) endif ifneq ($(strip $(CXX_DEPS)),) -include $(CXX_DEPS) endif ifneq ($(strip $(C_UPPER_DEPS)),) -include $(C_UPPER_DEPS) endif endif

-include ../makefile.defs

# Add inputs and outputs from these tool invocations to the build variables

# All Targetall: MyProject

# Tool invocationsMyProject: $(OBJS) $(USER_OBJS)@echo 'Building target: $@'@echo 'Invoking: GCC C++ Linker'g++ -o"MyProject" $(OBJS) $(USER_OBJS) $(LIBS)@echo 'Finished building target: $@'@echo ' '

# Other Targetsclean:-$(RM) $(OBJS)$(C++_DEPS)$(C_DEPS)$(CC_DEPS)$(CPP_DEPS)$(EXECUTABLES)$(CXX_DEPS)$(C_UPPER_DEPS) MyProject-@echo ' '

.PHONY: all clean dependents

.SECONDARY:

-include ../makefile.targets

Page 25: Linux  Night  brought to you by

My Makefile all:

g++ main.cpp -o main

It can get much more complicated and if you were doing anything non-trivial it should get more complicated

Need a resource?http://mrbook.org/tutorials/make/

Page 26: Linux  Night  brought to you by

Make In software

development, Make is a utility that automatically builds executable programs and libraries from source code by reading files called makefiles which specify how to derive the target program. 

Page 27: Linux  Night  brought to you by

Directory Structure Reference