1 / 27

Linux Night brought to you by

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

ricky
Download Presentation

Linux Night brought to you by

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Linux Night brought to you by

  2. 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.

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

  4. Which Linux is right for me?

  5. Brief History of Unix

  6. History of Linux • Linux History Chart: http://www.levenez.com/unix/unix.pdf • LinusTorvalds 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)

  7. 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.

  8. 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

  9. 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

  10. How I got eclipse

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

  12. 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

  13. 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

  14. Customizable • Any Distro • Any Layout • Tons of software to choose from • Multiple Desktops • Blah blahblah

  15. Terms I couldn’t slip in anywhere else… • GCC (GNU Compiler Collection) • GNU GRUB (Grand Unified Bootloader) • Wine (WINdowsEmulator or Wine Is Not an Emulator)

  16. Referencegasm • https://www.cfa.harvard.edu/~jbattat/computer/linuxReferenceCard.pdf • http://files.fosswire.com/2007/08/fwunixref.pdf • http://www.perpetualpc.net/srtd_commands_rev.html

  17. Eclipse (Netbeans) • IDE (Integrated Development Environment) • Reduces dependency on command line tools • http://www.codeproject.com/Articles/14222/C-Development-using-eclipse-IDE-Starters-guide

  18. Setting Up Wrong!!!

  19. Need the Dev tools… Help->Check For Updates Help->Install New Software

  20. Then we can make a fancy Project

  21. Main.cpp • #include <iostream> • #include "mine.h" • int main() • { • intmyint = 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; • }

  22. Mine.h void helloWorld() { std::cout << "Hello World"; } int increment(intincVal) { myint += incVal; return (myint); } std::string getSome() { return caos; } intgetmyint() { return myint; } }; • #pragma once • #include <string> • #include <iostream> • class mine • { • private: • intmyint; • std::string caos; • public: • mine() • { • myint = 0; • caos = "start some"; • }

  23. Eclipse Generated makefile -include ../makefile.defs # Add inputs and outputs from these tool invocations to the build variables # All Target all: MyProject # Tool invocations MyProject: $(OBJS) $(USER_OBJS) @echo 'Building target: $@' @echo 'Invoking: GCC C++ Linker' g++ -o"MyProject" $(OBJS) $(USER_OBJS) $(LIBS) @echo 'Finished building target: $@' @echo ' ' # Other Targets clean: -$(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 • ######################################### • # 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

  24. 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/

  25. 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. 

  26. Directory Structure Reference

More Related