CMake, an overview. D. Arrivault 1. 24th November, 2014 / Talep presentation. Aix Marseille Université. CMake, an overview.

Size: px
Start display at page:

Download "CMake, an overview. D. Arrivault 1. 24th November, 2014 / Talep presentation. Aix Marseille Université. CMake, an overview."

Transcription

1 CMake, an overview. D. Arrivault 1 1 Laboratoire d Excellence Archimède Aix Marseille Université 24th November, 2014 / Talep presentation

2 Outline Credits Build sytems What problems does it solve? The good old days... Features of a build system Introduction CMake project compilation workflow The CMake files Configuration step Writing a CMakeLists.txt Dependencies Adding Cache variables Adding subdirectories Include and build Install Tests integration About CTest CTest in practice Packaging About CPack CPack in practice Conclusion

3 Credits Outline Credits Build sytems What problems does it solve? The good old days... Features of a build system Introduction CMake project compilation workflow The CMake files Configuration step Writing a CMakeLists.txt Dependencies Adding Cache variables Adding subdirectories Include and build Install Tests integration About CTest CTest in practice Packaging About CPack CPack in practice Conclusion

4 Credits Credits Cédric Castagnède s presentation done at Inria Bordeaux Sud Ouest in June 19th, 2012 : CMake documentation

5 Build sytems Outline Credits Build sytems What problems does it solve? The good old days... Features of a build system Introduction CMake project compilation workflow The CMake files Configuration step Writing a CMakeLists.txt Dependencies Adding Cache variables Adding subdirectories Include and build Install Tests integration About CTest CTest in practice Packaging About CPack CPack in practice Conclusion

6 Build sytems What problems does it solve? What problems does it solve? For developpers: manage all the cycle edit/compile/test in a single place compile only what is necessary in the source code For a development team: For a user: generate packages run tests generate documentation install software easily manage dependen cies tune installation

7 Build sytems The good old days... The good old days... Example Writting personal Makefile... CC= gcc IDIR=include CFLAGS=-I$(IDIR) ODIR=obj LIBS=-lm _DEPS = hellosin.h DEPS = $(patsubst %,$(IDIR)/%,$(_DEPS)) _OBJ = hellosin.o main.o OBJ = $(patsubst %,$(ODIR)/%,$(_OBJ))

8 Build sytems The good old days... The good old days... Example $(ODIR)/%.o: hellosin:.phony: clean: Writting personal Makefile... %.c $(DEPS) $(CC) -c -o $< $(CFLAGS) $(OBJ) gcc -o $^ $(CFLAGS) $(LIBS) clean rm -f $(ODIR)/*.o *~ core $(INCDIR)/*~

9 Build sytems The good old days... The good old days... Painfull for the developer. Writing robust Makefiles for big project can be very time consuming. Portability = painfull configurations Installation, tests, packaging have to be done separatly. At the end, it can be very simple to use but a hard work has to be done before.

10 Build sytems Features of a build system Features of a build system Automatic dependency management of source code compile only modified files software portability use native build environment determine available OS/compiler features name correctly the library:.so /.dylib /.dl adaptability according to user environment auto-configuration of the project determine the availability and location of libraries, commands...

11 Build sytems Features of a build system Features of a build system customize installation cross-compiling give some information: help possibility to set information: prefix, libdir, disable-shared... have some target: make all, make install... launch tests without installation: link with generated library after an installation: link with installed library give a report of the build

12 Outline Credits Build sytems What problems does it solve? The good old days... Features of a build system Introduction CMake project compilation workflow The CMake files Configuration step Writing a CMakeLists.txt Dependencies Adding Cache variables Adding subdirectories Include and build Install Tests integration About CTest CTest in practice Packaging About CPack CPack in practice Conclusion

13 Introduction Introduction Open-source, cross-platform build system (New BSD Licence) Develop by Kitware since 2001 Using compiler-independent method Meta-build system : It doesn t do the final build It generates files for other build systems (Eclipse, Makefiles, XCodes, Cygwin... ) Give some extensions to locate libraries, headers... Give some interfaces for generate a test suite and packaging Allow out of source compilation. Notable research softwares using CMake : VXL (C++ Libraries for Computer Vision Research and Implementation), CGAL (Computational Geometry Algorithms Library)... Get form the official web site or from your distribution softwares management application.

14 CMake project compilation workflow CMake project compilation workflow Example Out of source compilation $ mkdir build $ cd build/ # directory for compilation $ cmake path/to/src/ # configuration $ make # compilation $ make install # installation

15 CMake project compilation workflow CMake project compilation workflow Read the CMakeCache.txt if it exists. Read the CMake input files : CMakeLists.txt. Write/create the cache back out : CMakeCache.txt. Generate the Makefiles with appropriate generator.

16 The CMake files The CMake files CMakeLists.txt It describes the project : list of source files, library dependencies... It is machine-independant. CMakeCache.txt It is generated by the cmake <path_to_source> command. It contains the configuration options. It can be modified via commandline, ccmake or cmake-gui (qt). It is machine-specific.

17 The CMake files The CMake files CMakeLists.txt It describes the project : list of source files, library dependencies... It is machine-independant. CMakeCache.txt It is generated by the cmake <path_to_source> command. It contains the configuration options. It can be modified via commandline, ccmake or cmake-gui (qt). It is machine-specific.

18 Configuration step Configuration step $ cmake /path/to/src -DCACHE_VARIABLE=<VALUE> -G "Makefile Generator" Some useful cache variables CMAKE_BUILD_TYPE=<Debug, Release> Control build type CMAKE_INSTALL_PREFIX=<path> Control the install directory CMAKE_VERBOSE_MAKEFILE=<ON, OFF> Control the verbosity of makefiles

19 Configuration step Configuration step $ cmake /path/to/src -DCACHE_VARIABLE=<VALUE> -G "Makefile Generator" Some Makefile generators Unix Makefiles standard Unix makefiles Borland Makefiles Borland makefiles Visual Studio 12 Visual Studio 12 project files Xcodes Xcode project files Eclipse CDT4 - Unix Makefiles Eclipse CDT 4.0 project files with Unix makefiles

20 Configuration step Configuration step ccmake

21 Writing a CMakeLists.txt Writing a CMakeLists.txt MonProjet lib include hellosin.h hellosin.c main.c CMakelists.txt /** hellosin.h */ #ifndef HELLOSIN_H #define HELLOSIN_H #include <stdio.h> #include <math.h> void print_message(); #endif /** hellosin.c */ #include "hellosin.h" void print_message() { printf ("Hello World!\n"); float sinpio4 = sin(m_pi/4.0); printf ("sin(pi/4)=%f\n", sinpio4); } /** main.c */ #include "hellosin.h" int main(int ac, char *av[]) { print_message(); return 0; }

22 Writing a CMakeLists.txt Writing a CMakeLists.txt CMakeList.txt CMAKE_MINIMUM_REQUIRED(VERSION 2.8) PROJECT(hellosin C) SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -lm") INCLUDE_DIRECTORIES("include") SET(SRC hellosin.c main.c) ADD_EXECUTABLE(hellosin ${SRC}) $ mkdir build $ cd build/ $ cmake.. $ make $./hellosin Hello World! sin(pi/4)=

23 Dependencies Dependencies Dependencies management uses cmake modules and find_package command. Some modules are already defined by cmake: #### Find PkConfig find_package( PkgConfig REQUIRED ) if (NOT PKG_CONFIG_FOUND) message (FATAL_ERROR "PkgConfig not found") else() message ("PkgConfig found") endif()

24 Dependencies Dependencies Defining a new module : FindGLIB2.cmake # - Try to find Glib2 # Once done this will define # GLIB2_FOUND - System has Glib2 # GLIB2_INCLUDE_DIRS - The Glib2 include directories # GLIB2_LIBRARIES - The libraries needed to use Glib2 if(glib2_include_dir AND GLIB2_LIBRARIES) # Already in cache, be silent set(glib2_find_quietly TRUE) endif(glib2_include_dir AND GLIB2_LIBRARIES) # find_package(pkgconfig) //Already done before #Use PkgConfig for getting paths if.pc file is known pkg_check_modules(pc_libglib2 glib-2.0>=2.0.0)

25 Dependencies Dependencies Defining a new module : FindGLIB2.cmake #Find include dir find_path(glib2_include_dirs NAMES glib.h HINTS ${PC_LIBGLIB2_INCLUDEDIR} ${ PC_LIBGLIB2_INCLUDE_DIRS} PATH_SUFFIXES glib-2.0 ) #Find library find_library(glib2_libraries NAMES glib-2.0 HINTS ${PC_LIBGLIB2_LIBDIR} ${ PC_LIBGLIB2_LIBRARY_DIRS} ) # handle the QUIETLY and REQUIRED arguments and set # GLIB2_FOUND to TRUE if all listed variables are TRUE include(findpackagehandlestandardargs) find_package_handle_standard_args(glib2 DEFAULT_MSG GLIB2_LIBRARIES GLIB2_INCLUDE_DIRS) # Set variables as advanced mark_as_advanced(glib2_include_dirs GLIB2_LIBRARIES )

26 Adding Cache variables Adding Cache variables set+cache or option set(install_bin_dir bin CACHE PATH "Installation directory for executables") set(install_lib_dir lib CACHE PATH "Installation directory for libraries") set(install_inc_dir include CACHE PATH "Installation directory for headers") set(install_data_dir share/${project_name} CACHE PATH " Installation directory for data files") option(build_documentation "Create and install the HTML based API documentation (requires Doxygen)" OFF)

27 Adding subdirectories Adding subdirectories Each subdirectory must contain a CMakeLists.txt. In the main CMakeLists.txt: #### Add macaon subdirectories add_subdirectory(${cmake_source_dir}/src/maca_common) add_subdirectory(${cmake_source_dir}/src/maca_lex) add_subdirectory(${cmake_source_dir}/src/maca_tags) add_subdirectory(${cmake_source_dir}/src/maca_morpho)

28 Adding subdirectories Adding subdirectories Each subdirectory must contain a CMakeLists.txt. CMakeLists.txt of the maca_morpho subdirectory: #Get the name of the subdirectory in upper case in FNAME_CAP get_filename_component(fname ${CMAKE_CURRENT_SOURCE_DIR} NAME) string(toupper "${FNAME}" FNAME_CAP) #Fill the HEADER_${FNAME_CAP} with headers files and set #its visiblity to parent scope set(headers_${fname_cap} ${CMAKE_CURRENT_SOURCE_DIR}/src/ maca_morpho.h PARENT_SCOPE) #Fill the SOURCES_${FNAME_CAP} with the source files and set #its visiblity to parent scope set(sources_${fname_cap} ${CMAKE_CURRENT_SOURCE_DIR}/src/ maca_morpho.c PARENT_SCOPE) #Add the header directory to HEADERS_MACAON_DIRS set(headers_macaon_dirs ${HEADERS_MACAON_DIRS} ${ CMAKE_CURRENT_SOURCE_DIR}/src PARENT_SCOPE)

29 Include and build Include and build Include headers directories in the main CMakeLists.txt: include_directories(${macaon_install_dir}/include) include_directories(${gfsm_include_dirs}) include_directories(${fst_include_dirs}) include_directories(${libxml2_include_dirs}) include_directories(${glib2_include_dirs}) include_directories(${libxml2_include_dir}) set(cmake_cxx_flags "${CMAKE_CXX_FLAGS} -std=c++0x -fpic") set(cmake_c_flags "${CMAKE_C_FLAGS} -fpic") include_directories(${headers_macaon_dirs})

30 Include and build Include and build Add libraries (object, static or shared) and binaries to build: #Create object library for maca_common_obj add_library(maca_common_obj OBJECT ${SOURCES_MACA_COMMON}) target_compile_definitions(maca_common_obj PUBLIC MACA_COMMON_VERSION=${MACA_COMMON_VERSION} PUBLIC MACAON_DIRECTORY="${INSTALL_DATA_DIR}") #Add txt2macaon target add_executable(txt2macaon $<TARGET_OBJECTS:maca_common_obj> ${ SOURCES_TXT2MACAON} ${CMAKE_CURRENT_SOURCE_DIR}/src/maca_conversions/txt2macaon/ txt2macaon.c) target_link_libraries(txt2macaon ${LIBXML2_LIBRARIES} ${ GLIB2_LIBRARIES} ${GFSM_LIBRARY} ${FST_LIBRARY}) SET_TARGET_PROPERTIES(txt2macaon PROPERTIES LINKER_LANGUAGE CXX) set(macaon_exe_targets ${MACAON_EXE_TARGETS} txt2macaon)

31 Include and build Include and build Add libraries (object, static or shared) and binaries to build: #create macaon library target add_library(macaon SHARED $<TARGET_OBJECTS:maca_common_obj> $< TARGET_OBJECTS:maca_segmenter_obj> ${MyFlexLexer} $< TARGET_OBJECTS:maca_tokenizer_obj> ${maca_tok_lex} $< TARGET_OBJECTS:maca_lex_obj> $<TARGET_OBJECTS: maca_lexer_obj> $<TARGET_OBJECTS:maca_tags_obj> $< TARGET_OBJECTS:maca_tagger_obj> $<TARGET_OBJECTS: maca_crf_tagger_obj> $<TARGET_OBJECTS:maca_morpho_obj> $< TARGET_OBJECTS:maca_anamorph_obj> $<TARGET_OBJECTS: maca_chunker_obj> $<TARGET_OBJECTS:maca_graph_parser_obj>) target_link_libraries(macaon ${LIBM_C_FLAGS} ${LIBXML2_LIBRARIES } ${GLIB2_LIBRARIES} ${GFSM_LIBRARY} ${FST_LIBRARY}) set(macaon_lib_targets ${MACAON_LIB_TARGETS} macaon) target_compile_definitions(macaon PUBLIC MACAON_VERSION=${ MACAON_VERSION})

32 Install Install The installation instructions are given with the CMake install command. Installing binaries and libraries : install(targets ${MACAON_EXE_TARGETS} ${MACAON_LIB_TARGETS} RUNTIME DESTINATION bin LIBRARY DESTINATION lib) Installing headers and other files : install(files ${MACAON_HEADERS} DESTINATION include/macaon) install(files ${CMAKE_CURRENT_BINARY_DIR}/${MACAONLIB_NAME}.pc DESTINATION ${INSTALL_LIB_DIR}/pkgconfig)

33 Install Install The installation instructions are given with the CMake install command. Installing directories : if(build_documentation) install(directory ${CMAKE_CURRENT_BINARY_DIR}/html DESTINATION ${INSTALL_DOC_DIR} ) endif(build_documentation)

34 Tests integration Outline Credits Build sytems What problems does it solve? The good old days... Features of a build system Introduction CMake project compilation workflow The CMake files Configuration step Writing a CMakeLists.txt Dependencies Adding Cache variables Adding subdirectories Include and build Install Tests integration About CTest CTest in practice Packaging About CPack CPack in practice Conclusion

35 Tests integration About CTest About CTest CTest can be used for test automation. CTest not only can manage unit or regression tests but it also can execute advanced tests (coverage, memory checking). CTest is distributed as a part of CMake but can be used alone. CTest uses the same syntaxe than CMake. CTest can be integrated within the CMakeLists.txt or independant with its own scripts. The tests results can be submit to a CDash server.

36 Tests integration CTest in practice CTest in practice In CMakeLists.txt: #### tests ENABLE_TESTING() set(ctest_project_name "MACAON") add_subdirectory (tests) INCLUDE(CTest) In tests/cmakelists.txt: ADD_EXECUTABLE(example example.cpp) ADD_TEST(test1 example)

37 Tests integration CTest in practice CTest in practice Using ctest from bash #Get list of tests $ ctest -N #Launch all tests $ make test # Or $ ctest #Launch one specific test $ ctest -R test1 Two log files : LastTest.log and LastTestsFailed.log

38 Packaging Outline Credits Build sytems What problems does it solve? The good old days... Features of a build system Introduction CMake project compilation workflow The CMake files Configuration step Writing a CMakeLists.txt Dependencies Adding Cache variables Adding subdirectories Include and build Install Tests integration About CTest CTest in practice Packaging About CPack CPack in practice Conclusion

39 Packaging About CPack About CPack CPack is a cross-platform software packaging tool. CPack is distributed as a part of CMake but can be used alone. CPack can be used for generating source distribution archive or architecture dependant binary packages (specified with the CPACK_GENERATOR variable). CPack uses the CMake install commands to fill the binary packages. Source distribution is a copy of the local depository (ignored files has to be explicitly defined).

40 Packaging CPack in practice CPack in practice In CMakeLists.txt: # build a CPack driven installer package include (InstallRequiredSystemLibraries) set (CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_SOURCE_DIR}/ COPYING") set (CPACK_PACKAGE_VERSION_MAJOR "${MACAON_MAJOR_VERSION}") set (CPACK_PACKAGE_VERSION_MINOR "${MACAON_MINOR_VERSION}") set (CPACK_PACKAGE_DESCRIPTION_SUMMARY "Macaon") set (CPACK_PACKAGE_VENDOR "Talep / LIF") set (CPACK_PACKAGE_DESCRIPTION_FILE ${CMAKE_CURRENT_SOURCE_DIR}/ README) set (CPACK_GENERATOR "DEB") set (CPACK_DEBIAN_PACKAGE_MAINTAINER "Denis Arrivault") # required set (CPACK_SOURCE_PACKAGE_FILE_NAME "Macaon-${ CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR }-Source" CACHE INTERNAL "tarball basename") set(cpack_source_generator TGZ) set(cpack_source_ignore_files ".project;/.git/;.gitignore;/build /;/install/;${cpack_source_ignore_files}") include (CPack)

41 Packaging CPack in practice CPack in practice Generate package: #Source package $ make package_source #Binary package $ make package

42 Conclusion Outline Credits Build sytems What problems does it solve? The good old days... Features of a build system Introduction CMake project compilation workflow The CMake files Configuration step Writing a CMakeLists.txt Dependencies Adding Cache variables Adding subdirectories Include and build Install Tests integration About CTest CTest in practice Packaging About CPack CPack in practice Conclusion

43 Conclusion Conclusion easy to develop Configure/Build/Install/Test/Package in one tool with the same syntax. Multi-plateform Easy to use can mean reinventing the wheel. As usual, RTFM!

CMake build system. Distribute your software easily. Cédric Castagnède Mars engineer innovate integrate

CMake build system. Distribute your software easily. Cédric Castagnède Mars engineer innovate integrate CMake build system Distribute your software easily Cédric Castagnède Mars 2016 Outline 1. Motivations of a build system 2. CMake build system 3. Test integration 4. Packaging an application 5. Automation

More information

CMake support in FreeFem++

CMake support in FreeFem++ CMake support in FreeFem++ Cédric Doucet Inria Paris December 8, 2016 Current installation of FreeFem++ Current installation of FreeFem++ Installation from binaries/packages: very easy Mac, Ubuntu and

More information

CMake & Ninja. by István Papp

CMake & Ninja. by István Papp CMake & Ninja by István Papp istvan.papp@ericsson.com Hello & Disclaimer I don t know everything (surprise!), if I stare blankly after a question, go to https://cmake.org/ Spoiler alert: or https://ninja-build.org/

More information

Mastering CMake Fifth Edition

Mastering CMake Fifth Edition Mastering CMake Fifth Edition Ken Bill Martin & Hoffman With contributions from: Andy Cedilnik, David Cole, Marcus Hanwell, Julien Jomier, Brad King, Alex Neundorf Published by Kitware Inc. Join the CMake

More information

Data and File Structures Laboratory

Data and File Structures Laboratory Tools: Gcov, Cscope, Ctags, and Makefiles Assistant Professor Machine Intelligence Unit Indian Statistical Institute, Kolkata August, 2018 1 Gcov 2 Cscope 3 Ctags 4 Makefiles Gcov Gcov stands for GNU Coverage

More information

Introduction to Supercomputing

Introduction to Supercomputing Introduction to Supercomputing TMA4280 Introduction to UNIX environment and tools 0.1 Getting started with the environment and the bash shell interpreter Desktop computers are usually operated from a graphical

More information

Introduc)on to CMake. Ben Thomas.

Introduc)on to CMake. Ben Thomas. Introduc)on to CMake Ben Thomas b.a.thomas@ucl.ac.uk 1 Overview What is CMake? "Hello World!" demo Package management CCP SuperBuild CTest and CPack 2 What is CMake? h#p://www.cmake.com CMake is an open-source,

More information

CMPT 373 Software Development Methods. Building Software. Nick Sumner Some materials from Shlomi Fish & Kitware

CMPT 373 Software Development Methods. Building Software. Nick Sumner Some materials from Shlomi Fish & Kitware CMPT 373 Software Development Methods Building Software Nick Sumner wsumner@sfu.ca Some materials from Shlomi Fish & Kitware What does it mean to build software? How many of you know how to build software?

More information

CMake refactoring. P. Hristov 19/03/2014

CMake refactoring. P. Hristov 19/03/2014 CMake refactoring P. Hristov 19/03/2014 History I Recursive makefiles (F.Carminati): 1999-2001 Problems in dependencies Slow "Recursive Makefiles Considered Harmful" => flat makefiles similar to what Root

More information

Generic TriBITS Project, Build, Test, and Install Reference Guide

Generic TriBITS Project, Build, Test, and Install Reference Guide Generic TriBITS Project, Build, Test, and Install Reference Guide Author: Roscoe A. Bartlett Contact: bartlett.roscoe@gmail.com Date: 2018-03-12 Version: tribits_start-2039-g2119b16 Abstract: This document

More information

2 Compiling a C program

2 Compiling a C program 2 Compiling a C program This chapter describes how to compile C programs using gcc. Programs can be compiled from a single source file or from multiple source files, and may use system libraries and header

More information

CMPT 300. Operating Systems. Brief Intro to UNIX and C

CMPT 300. Operating Systems. Brief Intro to UNIX and C CMPT 300 Operating Systems Brief Intro to UNIX and C Outline Welcome Review Questions UNIX basics and Vi editor Using SSH to remote access Lab2(4214) Compiling a C Program Makefile Basic C/C++ programming

More information

How to install and build an application

How to install and build an application GEANT4 BEGINNERS COURSE GSSI, L Aquila (Italy) 27-30 June 2016 How to install and build an application tutorial course Outline Supported platforms & compilers Required software Where to download the packages

More information

COSC345 Software Engineering. Make

COSC345 Software Engineering. Make COSC345 Software Engineering Make The build process Make When to use make How to use make Suffix rules makedepend Outline Warning: Make is different everywhere you go! Build Process The build process can

More information

Workshop Agenda Feb 25 th 2015

Workshop Agenda Feb 25 th 2015 Workshop Agenda Feb 25 th 2015 Time Presenter Title 09:30 T. König Talk bwhpc Concept & bwhpc-c5 - Federated User Support Activities 09:45 R. Walter Talk bwhpc architecture (bwunicluster, bwforcluster

More information

[Software Development] Makefiles. Davide Balzarotti. Eurecom Sophia Antipolis, France

[Software Development] Makefiles. Davide Balzarotti. Eurecom Sophia Antipolis, France [Software Development] Makefiles Davide Balzarotti Eurecom Sophia Antipolis, France 1 Software Development Tools 1. Configuring and Building the program GCC Makefiles Autotools 2. Writing and managing

More information

CS11 Advanced C++ Fall Lecture 4

CS11 Advanced C++ Fall Lecture 4 CS11 Advanced C++ Fall 2006-2007 Lecture 4 Today s Topics Using make to automate build tasks Using doxygen to generate API docs Build-Automation Standard development cycle: Write more code Compile Test

More information

Continue: How do I learn C? C Primer Continued (Makefiles, debugging, and more ) Last Time: A Simple(st) C Program 1-hello-world.c!

Continue: How do I learn C? C Primer Continued (Makefiles, debugging, and more ) Last Time: A Simple(st) C Program 1-hello-world.c! Continue: How do I learn C? C Primer Continued (Makefiles, debugging, and more ) Hello Word! ~/ctest/ In addition to syntax you need to learn: the Tools the Libraries. And the Documentation. Maria Hybinette,

More information

Creating a Project Using an Existing Build System

Creating a Project Using an Existing Build System Creating a Project Using an Existing Build System You can use the cpptestscan or cpptesttrace utility to create a C++test project that you would normally build using tools such as GNU make, CMake, and

More information

HPC User Environment

HPC User Environment HPC User Environment Dirk Schmidl schmidl@rz.rwth-aachen.de Center for Computing and Communication RWTH Aachen University 22.03.2010 1 Program development tools on Linux IDEs eclipse sunstudio kdevelop

More information

XIV Seminar on Software for Nuclear, Subnuclear and Applied Physics Alghero (ITALY) June Geant4 Installation.

XIV Seminar on Software for Nuclear, Subnuclear and Applied Physics Alghero (ITALY) June Geant4 Installation. XIV Seminar on Software for Nuclear, Subnuclear and Applied Physics Alghero (ITALY) 04-09 June 2017 Geant4 Installation Geant4 tutorial Installation process 1) Check that you meet all the requirements

More information

Build a Geant4 application

Build a Geant4 application JUNO GEANT4 SCHOOL Beijing ( 北京 ) 15-19 May 2017 Build a Geant4 application Geant4 tutorial Application build process 1) Properly organize your code into directories 2) Prepare a CMakeLists.txt file 3)

More information

Tool for Analysing and Checking MPI Applications

Tool for Analysing and Checking MPI Applications Tool for Analysing and Checking MPI Applications April 30, 2010 1 CONTENTS CONTENTS Contents 1 Introduction 3 1.1 What is Marmot?........................... 3 1.2 Design of Marmot..........................

More information

cget Documentation Release Paul Fultz II

cget Documentation Release Paul Fultz II cget Documentation Release 0.1.0 Paul Fultz II Jun 27, 2018 Contents 1 Introduction 3 1.1 Installing cget.............................................. 3 1.2 Quickstart................................................

More information

Tutorial: Compiling, Makefile, Parallel jobs

Tutorial: Compiling, Makefile, Parallel jobs Tutorial: Compiling, Makefile, Parallel jobs Hartmut Häfner Steinbuch Centre for Computing (SCC) Funding: www.bwhpc-c5.de Outline Compiler + Numerical Libraries commands Linking Makefile Intro, Syntax

More information

Software Building (Sestavování aplikací)

Software Building (Sestavování aplikací) Software Building (Sestavování aplikací) http://d3s.mff.cuni.cz Pavel Parízek parizek@d3s.mff.cuni.cz CHARLES UNIVERSITY IN PRAGUE faculty of mathematics and physics Make Nástroje pro vývoj software Software

More information

GNU make... Martin Ohlerich, Parallel Programming of High Performance Systems

GNU make... Martin Ohlerich, Parallel Programming of High Performance Systems ... Martin Ohlerich, Martin.Ohlerich@lrz.de Parallel Programming of High Performance Systems Outline 1 2 3 Leibniz Rechenzentrum 2 / 42 Outline 1 2 3 Leibniz Rechenzentrum 3 / 42 Common Situation Larger

More information

Building and Documenting Bioinformatics Workflows with Python-based Snakemake

Building and Documenting Bioinformatics Workflows with Python-based Snakemake Building and Documenting Bioinformatics Workflows with Python-based Snakemake Johannes Köster, Sven Rahmann German Conference on Bioinformatics September 2012 1 / 13 Structure 1 Motivation 2 Snakemake

More information

COMP s1 Lecture 1

COMP s1 Lecture 1 COMP1511 18s1 Lecture 1 1 Numbers In, Numbers Out Andrew Bennett more printf variables scanf 2 Before we begin introduce yourself to the person sitting next to you why did

More information

EasyFlow - v Application Developer Guide

EasyFlow - v Application Developer Guide EasyFlow - v.0.2.1 Application Developer Guide June 23, 2014 i 2013 CAMELOT Biomedical Systems Srl. The information in this document is proprietary to CAMELOT. No part of this publication may be reproduced,

More information

Embracing Modern CMake

Embracing Modern CMake Embracing Modern CMake How to recognize and use modern CMake interfaces Stephen Kelly Dublin C++ Meetup September 11, 2017 1 / 1 Background 2 / 1 CMake - What, Why, Who Buildsystem Generator Cross-platform

More information

Exercise 1: Basic Tools

Exercise 1: Basic Tools Exercise 1: Basic Tools This exercise is created so everybody can learn the basic tools we will use during this course. It is really more like a tutorial than an exercise and, you are not required to submit

More information

CS Basics 15) Compiling a C prog.

CS Basics 15) Compiling a C prog. CS Basics 15) Compiling a C prog. Emmanuel Benoist Fall Term 2016-17 Berner Fachhochschule Haute cole spcialise bernoise Berne University of Applied Sciences 1 Compiling a C program Example of a small

More information

Berner Fachhochschule Haute cole spcialise bernoise Berne University of Applied Sciences 2

Berner Fachhochschule Haute cole spcialise bernoise Berne University of Applied Sciences 2 Compiling a C program CS Basics 15) Compiling a C prog. Emmanuel Benoist Fall Term 2016-17 Example of a small program Makefile Define Variables Compilation options Conclusion Berner Fachhochschule Haute

More information

CS240: Programming in C

CS240: Programming in C CS240: Programming in C Lecture 2: Hello World! Cristina Nita-Rotaru Lecture 2/ Fall 2013 1 Introducing C High-level programming language Developed between 1969 and 1973 by Dennis Ritchie at the Bell Labs

More information

The C Preprocessor Compiling and Linking Using MAKE

The C Preprocessor Compiling and Linking Using MAKE All slides c Brandon Runnels, 2014 This presentation is not for general distribution; please do not duplicate without the author s permission. Under no circumstances should these slides be sold or used

More information

UNIX Makefile. C Project Library Distribution and Installation.

UNIX Makefile. C Project Library Distribution and Installation. UNIX Makefile C Project Library Distribution and Installation. Tarballs Most non-package software is distributed in source code format. The most common format being C project libraries in compressed TAR

More information

Makefiles SE 2XA3. Term I, 2018/19

Makefiles SE 2XA3. Term I, 2018/19 Makefiles SE 2XA3 Term I, 2018/19 Outline Example Calling make Syntax How it works Macros Suffix rules Command line options Example Assume we have files main.c, test.c, and lo.asm Consider the makefile

More information

Modern CMake. Open source tools to build, test and package software: CMake, CTest, CPack, CDash

Modern CMake. Open source tools to build, test and package software: CMake, CTest, CPack, CDash Modern CMake Open source tools to build, test and package software: CMake, CTest, CPack, CDash 1 Bill Hoffman CTO and a founder of Kitware Inc Originator of CMake build tool Barefoot/Sandals Ultra distance

More information

CS 261 Recitation 1 Compiling C on UNIX

CS 261 Recitation 1 Compiling C on UNIX Oregon State University School of Electrical Engineering and Computer Science CS 261 Recitation 1 Compiling C on UNIX Winter 2017 Outline Secure Shell Basic UNIX commands Editing text The GNU Compiler

More information

Embedded Software TI2726 B. 3. C tools. Koen Langendoen. Embedded Software Group

Embedded Software TI2726 B. 3. C tools. Koen Langendoen. Embedded Software Group Embedded Software 3. C tools TI2726 B Koen Langendoen Embedded Software Group C development cycle 1. [Think] 2. Edit 3. Compile 4. Test 5. Debug 6. Tune UNIX toolbox 2. vi, emacs, gedit 3. gcc, make 4.

More information

How to install and build an application

How to install and build an application GEANT4 BEGINNERS COURSE GSSI, L Aquila (Italy) 12 nd May 2014 How to install and build an application tutorial course Outline Supported platforms & compilers Required software Where to download the packages

More information

How to learn C? CSCI [4 6]730: A C Refresher or Introduction. Diving In: A Simple C Program 1-hello-word.c

How to learn C? CSCI [4 6]730: A C Refresher or Introduction. Diving In: A Simple C Program 1-hello-word.c How to learn C? CSCI [4 6]730: A C Refresher or Introduction Hello Word! ~/ctutorial/ In addition to syntax you need to learn: the Tools. the Libraries. And the Documentation (how to access) Practice on

More information

CSC 2500: Unix Lab Fall 2016

CSC 2500: Unix Lab Fall 2016 CSC 2500: Unix Lab Fall 2016 Makefile Mohammad Ashiqur Rahman Department of Computer Science College of Engineering Tennessee Tech University Agenda Make Utility Build Process The Basic Makefile Target

More information

The C standard library

The C standard library C introduction The C standard library The C standard library 1 / 12 Contents Do not reinvent the wheel Useful headers Man page The C standard library 2 / 12 The Hitchhiker s Guide to the standard library

More information

10/02/2012. Paco Abad Feb 10 th, 2012

10/02/2012. Paco Abad Feb 10 th, 2012 WGM 45. Using CMake to automate project compilation Paco Abad Feb 10 th, 2012 Introduction Welcome to CMake, the cross-platform, open-source build system. CMakeis a family of tools designed to build, test

More information

How to install and build an application

How to install and build an application GEANT4 BEGINNERS COURSE GSSI, L Aquila (Italy) 6-10 July 2015 How to install and build an application tutorial course Outline Supported platforms & compilers Required software Where to download the packages

More information

Building Allegro 5 Library using TDM-GCC and CMake

Building Allegro 5 Library using TDM-GCC and CMake Slide 1 Building Allegro 5 Library using TDM-GCC and CMake Step # Slide # Contents 1 2 Download and Install TDM MinGW 2 5 Test properly installed TDM-GCC version of MinGW 3 9 Download & unzip Allegro,

More information

CMake Installing and Finding packages, Exporting and Importing targets

CMake Installing and Finding packages, Exporting and Importing targets CMake Installing and Finding packages, Exporting and Importing targets Alexander Neundorf Feb 2nd 2013, FOSDEM Brussels 1/15 Outline find_package() MODULE mode find_package() CONFIG

More information

Reliable C++ development - session 1: From C to C++ (and some C++ features)

Reliable C++ development - session 1: From C to C++ (and some C++ features) Reliable C++ development - session 1: From C to C++ (and some C++ features) Thibault CHOLEZ - thibault.cholez@loria.fr TELECOM Nancy - Université de Lorraine LORIA - INRIA Nancy Grand-Est From Nicolas

More information

Embedded Systems Programming

Embedded Systems Programming Embedded Systems Programming OS Linux - Toolchain Iwona Kochańska Gdansk University of Technology Embedded software Toolchain compiler and tools for hardwaredependent software developement Bootloader initializes

More information

ANSI C. Data Analysis in Geophysics Demián D. Gómez November 2013

ANSI C. Data Analysis in Geophysics Demián D. Gómez November 2013 ANSI C Data Analysis in Geophysics Demián D. Gómez November 2013 ANSI C Standards published by the American National Standards Institute (1983-1989). Initially developed by Dennis Ritchie between 1969

More information

Multiple file project management & Makefile

Multiple file project management & Makefile Multiple file project management & Makefile Compilation & linkage read.c read.h main.c Compilation: gcc -c read.c main.c list.c list.h list.c read.o main.o list.o Linkage: gcc... read.o main.o list.o -o

More information

Make was originally a Unix tool from 1976, but it has been re-implemented several times, notably as GNU Make.

Make was originally a Unix tool from 1976, but it has been re-implemented several times, notably as GNU Make. make Make was originally a Unix tool from 1976, but it has been re-implemented several times, notably as GNU Make. Make accepts a Makefile, which is a strictly formatted file detailing a series of desired

More information

Building C Programs. Shawn T. Brown Director of Public Health Applications Pittsburgh Supercomputing Center Pittsburgh Supercomputing Center

Building C Programs. Shawn T. Brown Director of Public Health Applications Pittsburgh Supercomputing Center Pittsburgh Supercomputing Center Building C Programs Shawn T. Brown Director of Public Health Applications Pittsburgh Supercomputing Center 2012 Pittsburgh Supercomputing Center Computers do not understand programming languages #include

More information

Intermediate Programming, Spring 2017*

Intermediate Programming, Spring 2017* 600.120 Intermediate Programming, Spring 2017* Misha Kazhdan *Much of the code in these examples is not commented because it would otherwise not fit on the slides. This is bad coding practice in general

More information

CAAM 420 Daily Note. Scriber: Qijia Jiang. Date: Oct.16. Project 3 Due Wed 23.Oct. Two parts: debug code and library exercise.

CAAM 420 Daily Note. Scriber: Qijia Jiang. Date: Oct.16. Project 3 Due Wed 23.Oct. Two parts: debug code and library exercise. CAAM 420 Daily Note Scriber: Qijia Jiang Date: Oct.16 1 Announcement Project 3 Due Wed 23.Oct. Two parts: debug code and library exercise. 2 Make Convention Make syntax for library directories and library

More information

We d like to hear your suggestions for improving our indexes. Send to

We d like to hear your suggestions for improving our indexes. Send  to Index [ ] (brackets) wildcard, 12 { } (curly braces) in variables, 41 ( ) (parentheses) in variables, 41 += (append) operator, 45 * (asterisk) wildcard, 12 $% automatic variable, 16 $+ automatic variable,

More information

Deep C. Multifile projects Getting it running Data types Typecasting Memory management Pointers. CS-343 Operating Systems

Deep C. Multifile projects Getting it running Data types Typecasting Memory management Pointers. CS-343 Operating Systems Deep C Multifile projects Getting it running Data types Typecasting Memory management Pointers Fabián E. Bustamante, Fall 2004 Multifile Projects Give your project a structure Modularized design Reuse

More information

Introduction to Supercomputing

Introduction to Supercomputing Introduction to Supercomputing TMA4280 Introduction to development tools 0.1 Development tools During this course, only the make tool, compilers, and the GIT tool will be used for the sake of simplicity:

More information

Make. Dependency Graphs

Make. Dependency Graphs Make Typical program development cycle think edit compile test Potential problems edit a file, but forget to compile it edit an interface, but forget to compile all the files that depend on it do more

More information

CS354R: Game Technology

CS354R: Game Technology CS354R: Game Technology DevOps and Quality Assurance Fall 2018 What is DevOps? Development Operations Backend facilitation of development Handles local and remote hardware Maintains build infrastructure

More information

Introduction to C An overview of the programming language C, syntax, data types and input/output

Introduction to C An overview of the programming language C, syntax, data types and input/output Introduction to C An overview of the programming language C, syntax, data types and input/output Teil I. a first C program TU Bergakademie Freiberg INMO M. Brändel 2018-10-23 1 PROGRAMMING LANGUAGE C is

More information

GDB and Makefile. Bin Li Assistant Professor Dept. of Electrical, Computer and Biomedical Engineering University of Rhode Island

GDB and Makefile. Bin Li Assistant Professor Dept. of Electrical, Computer and Biomedical Engineering University of Rhode Island GDB and Makefile Bin Li Assistant Professor Dept. of Electrical, Computer and Biomedical Engineering University of Rhode Island GDB Debugging: An Example #include void main() { int i; int result

More information

The Make Utility. Independent compilation. Large programs are difficult to maintain. Problem solved by breaking the program into separate files

The Make Utility. Independent compilation. Large programs are difficult to maintain. Problem solved by breaking the program into separate files The Make Utility Independent compilation Large programs are difficult to maintain Problem solved by breaking the program into separate files Different functions placed in different files The main function

More information

Testing of Qt applications using CMake, CDash and Squish by the example of Pre-Stack PRO, a HPC seismic processing software

Testing of Qt applications using CMake, CDash and Squish by the example of Pre-Stack PRO, a HPC seismic processing software Testing of Qt applications using CMake, CDash and Squish by the example of Pre-Stack PRO, a HPC seismic processing software Alexander Neundorf Fraunhofer ITWM, Competence

More information

JTSK Programming in C II C-Lab II. Lecture 3 & 4

JTSK Programming in C II C-Lab II. Lecture 3 & 4 JTSK-320112 Programming in C II C-Lab II Lecture 3 & 4 Xu (Owen) He Spring 2018 Slides modified from Dr. Kinga Lipskoch Planned Syllabus The C Preprocessor Bit Operations Pointers and Arrays (Dynamically

More information

AN 834: Developing for the Intel HLS Compiler with an IDE

AN 834: Developing for the Intel HLS Compiler with an IDE AN 834: Developing for the Intel HLS Compiler with an IDE Subscribe Send Feedback Latest document on the web: PDF HTML Contents Contents 1 Developing for the Intel HLS Compiler with an Eclipse* IDE...

More information

15213 Recitation Section C

15213 Recitation Section C 15213 Recitation Section C Outline Sept. 9, 2002 Introduction Unix and C Playing with Bits Practice Problems Introducing Myself Try to pronounce my name: My office hour: Wed 2-3pm, WeH 8019 Contact: Email:

More information

Shell Project Part 1 (140 points)

Shell Project Part 1 (140 points) CS 453: Operating Systems Project 1 Shell Project Part 1 (140 points) 1 Setup All the programming assignments for Linux will be graded on the onyx cluster(onyx.boisestate.edu). Please test your programs

More information

CS240: Programming in C. Lecture 2: Overview

CS240: Programming in C. Lecture 2: Overview CS240: Programming in C Lecture 2: Overview 1 Programming Model How does C view the world? Stack Memory code Globals 2 Programming Model Execution mediated via a stack function calls and returns local

More information

C Compilation Model. Comp-206 : Introduction to Software Systems Lecture 9. Alexandre Denault Computer Science McGill University Fall 2006

C Compilation Model. Comp-206 : Introduction to Software Systems Lecture 9. Alexandre Denault Computer Science McGill University Fall 2006 C Compilation Model Comp-206 : Introduction to Software Systems Lecture 9 Alexandre Denault Computer Science McGill University Fall 2006 Midterm Date: Thursday, October 19th, 2006 Time: from 16h00 to 17h30

More information

Introduction to System Programming : makefile

Introduction to System Programming : makefile Introduction to System Programming : makefile Reference Documentation: http://www.gnu.org/software/make/manual/make.html Tutorials: http://www.cs.umd.edu/class/spring2002/cmsc214/tutorial/makefile.html

More information

1. Install Homebrew. 2. Install CMake. 3. Build and run the OpenGL program

1. Install Homebrew. 2. Install CMake. 3. Build and run the OpenGL program Compiling OpenGL Programs on macos or Linux using CMake This tutorial explains how to compile OpenGL programs on macos using CMake a cross-platform tool for managing the build process of software using

More information

CS11 Intro C++ Spring 2018 Lecture 4

CS11 Intro C++ Spring 2018 Lecture 4 CS11 Intro C++ Spring 2018 Lecture 4 Build Automation When a program grows beyond a certain size, compiling gets annoying g++ -std=c++14 -Wall units.cpp testbase.cpp \ hw3testunits.cpp -o hw3testunits

More information

KYC - Know your compiler. Introduction to GCC

KYC - Know your compiler. Introduction to GCC KYC - Know your compiler Introduction to GCC The Operating System User User 1 General Purpose or Application Specific Software Operating System Kernel Computer Hardware User 2 What is GCC? GCC is the GNU

More information

Monitoring the software quality in FairRoot. Gesellschaft für Schwerionenforschung, Plankstrasse 1, Darmstadt, Germany

Monitoring the software quality in FairRoot. Gesellschaft für Schwerionenforschung, Plankstrasse 1, Darmstadt, Germany Gesellschaft für Schwerionenforschung, Plankstrasse 1, 64291 Darmstadt, Germany E-mail: f.uhlig@gsi.de Mohammad Al-Turany Gesellschaft für Schwerionenforschung, Plankstrasse 1, 64291 Darmstadt, Germany

More information

How to install and build an application. Giuliana Milluzzo INFN-LNS

How to install and build an application. Giuliana Milluzzo INFN-LNS How to install and build an application Giuliana Milluzzo INFN-LNS Outline Supported platforms & compilers Required software Where to download the packages Geant4 toolkit installation (release 10) Using

More information

MARS Code Reorganization

MARS Code Reorganization MARS Code Reorganization Build Systems, Code Repositories, and much more... Tiago Quintino Sebastien Villaume, Manuel Fuentes, Baudouin Raoult mars-admins@ecmwf.int ECMWF March 9, 2016 Code Cleanup MARS

More information

Supported platforms & compilers Required software Where to download the packages Geant4 toolkit installation (release 10.1.p02)

Supported platforms & compilers Required software Where to download the packages Geant4 toolkit installation (release 10.1.p02) Supported platforms & compilers Required software Where to download the packages Geant4 toolkit installation (release 10.1.p02) Using CMake Building a Geant4 application with CMake Example of a Geant4

More information

Maemo Diablo GNU Make and makefiles Training Material

Maemo Diablo GNU Make and makefiles Training Material Maemo Diablo GNU Make and makefiles Training Material February 9, 2009 Contents 1 GNU Make and makefiles 2 1.1 What is GNU Make?......................... 2 1.2 How does make work?........................

More information

Lab 2: More Advanced C

Lab 2: More Advanced C Lab 2: More Advanced C CIS*2520 Data Structures (S08) TA: El Sayed Mahmoud This presentation is created by many TAs of previous years and updated to satisfy the requirements of the course in this semester.

More information

Laboratorio di Programmazione. Prof. Marco Bertini

Laboratorio di Programmazione. Prof. Marco Bertini Laboratorio di Programmazione Prof. Marco Bertini marco.bertini@unifi.it http://www.micc.unifi.it/bertini/ How the compiler works Programs and libraries The compiler In C++, everytime someone writes ">>

More information

Oregon State University School of Electrical Engineering and Computer Science. CS 261 Recitation 1. Spring 2011

Oregon State University School of Electrical Engineering and Computer Science. CS 261 Recitation 1. Spring 2011 Oregon State University School of Electrical Engineering and Computer Science CS 261 Recitation 1 Spring 2011 Outline Using Secure Shell Clients GCC Some Examples Intro to C * * Windows File transfer client:

More information

Continuous Integration INRIA

Continuous Integration INRIA Vincent Rouvreau - https://sed.saclay.inria.fr February 28, 2017 Contents 1 Preamble In this exercise, we will focus on the configuration of Jenkins for: 1. A simple aspect of C++ unit testing 2. An aspect

More information

82V391x / 8V893xx WAN PLL Device Families Device Driver User s Guide

82V391x / 8V893xx WAN PLL Device Families Device Driver User s Guide 82V391x / 8V893xx WAN PLL Device Families Device Driver Version 1.2 April 29, 2014 Table of Contents 1. Introduction... 1 2. Software Architecture... 2 2.1. Overview... 2 2.2. Hardware Abstraction Layer

More information

Hello, World! in C. Johann Myrkraverk Oskarsson October 23, The Quintessential Example Program 1. I Printing Text 2. II The Main Function 3

Hello, World! in C. Johann Myrkraverk Oskarsson October 23, The Quintessential Example Program 1. I Printing Text 2. II The Main Function 3 Hello, World! in C Johann Myrkraverk Oskarsson October 23, 2018 Contents 1 The Quintessential Example Program 1 I Printing Text 2 II The Main Function 3 III The Header Files 4 IV Compiling and Running

More information

A Practical Application of the Computational Science Environment (CSE)

A Practical Application of the Computational Science Environment (CSE) A Practical Application of the Computational Science Environment (CSE) by John Vines, Kelly Kirk, Eric Mark, Carrie Spear, and Joel Martin ARL-TR-5840 December 2011 Approved for public release; distribution

More information

CLS 2 Manual. December 11, Installation Requirements General installation procedure Execution and configuration...

CLS 2 Manual. December 11, Installation Requirements General installation procedure Execution and configuration... CLS 2 Manual December 11, 2012 Contents 1 Installation 2 1.1 Requirements......................................... 2 1.2 General installation procedure................................ 2 1.3 Execution and

More information

The Make Utility. Independent compilation. Large programs are difficult to maintain. Problem solved by breaking the program into separate files

The Make Utility. Independent compilation. Large programs are difficult to maintain. Problem solved by breaking the program into separate files The Make Utility Independent compilation Large programs are difficult to maintain Problem solved by breaking the program into separate files Different functions placed in different files The main function

More information

CSE 303, Winter 2007, Final Examination 15 March Please do not turn the page until everyone is ready.

CSE 303, Winter 2007, Final Examination 15 March Please do not turn the page until everyone is ready. Name: CSE 303, Winter 2007, Final Examination 15 March 2007 Please do not turn the page until everyone is ready. Rules: The exam is closed-book, closed-note, except for two 8.5x11in pieces of paper (both

More information

CSE 351. Introduction & Course Tools

CSE 351. Introduction & Course Tools CSE 351 Introduction & Course Tools Meet Your TA TA Name Interesting information examples: Where you are from Year in school Hobbies Unique talents Introductions Pick an interesting (but quick) ice breaker

More information

FOLLOW ALONG WITH THE EXAMPLES

FOLLOW ALONG WITH THE EXAMPLES FOLLOW ALONG WITH THE EXAMPLES $ git clone https://gitlab.com/jtfrey/unix-software-dev.git ( or "git pull" if you cloned at last session ) $ git checkout tags/session2 $ ls -l total 8 -rw-r--r-- 1 frey

More information

8 Novembre How to install

8 Novembre How to install Utilizzo del toolkit di simulazione Geant4 Laboratori Nazionali del Gran Sasso 8 Novembre 2010 2010 How to install Outline Supported platforms & compilers External software packages and tools Working area

More information

CMPSC 311- Introduction to Systems Programming Module: Build Processing

CMPSC 311- Introduction to Systems Programming Module: Build Processing CMPSC 311- Introduction to Systems Programming Module: Build Processing Professor Patrick McDaniel Fall 2014 UNIX Pipes Pipes are ways of redirecting the output of one command to the input of another Make

More information

Laboratorio di Programmazione. Prof. Marco Bertini

Laboratorio di Programmazione. Prof. Marco Bertini Laboratorio di Programmazione Prof. Marco Bertini marco.bertini@unifi.it http://www.micc.unifi.it/bertini/ How the compiler works Programs and libraries The compiler In C++, everytime someone writes ">>

More information

#include <stdio.h> int main() { char s[] = Hsjodi, *p; for (p = s + 5; p >= s; p--) --*p; puts(s); return 0;

#include <stdio.h> int main() { char s[] = Hsjodi, *p; for (p = s + 5; p >= s; p--) --*p; puts(s); return 0; 1. Short answer questions: (a) Compare the typical contents of a module s header file to the contents of a module s implementation file. Which of these files defines the interface between a module and

More information

PRINCIPLES OF OPERATING SYSTEMS

PRINCIPLES OF OPERATING SYSTEMS PRINCIPLES OF OPERATING SYSTEMS Tutorial-1&2: C Review CPSC 457, Spring 2015 May 20-21, 2015 Department of Computer Science, University of Calgary Connecting to your VM Open a terminal (in your linux machine)

More information

C introduction: part 1

C introduction: part 1 What is C? C is a compiled language that gives the programmer maximum control and efficiency 1. 1 https://computer.howstuffworks.com/c1.htm 2 / 26 3 / 26 Outline Basic file structure Main function Compilation

More information

Luis Ibáñez William Schroeder Insight Software Consortium. Getting Started with ITK

Luis Ibáñez William Schroeder Insight Software Consortium. Getting Started with ITK Luis Ibáñez William Schroeder Insight Software Consortium Getting Started with ITK What is ITK Image Processing Segmentation Registration No Graphical User Interface (GUI) No Visualization ITK Sponsors

More information