Download presentation
Presentation is loading. Please wait.
Published byElfreda Fletcher Modified over 9 years ago
1
System Programming - LAB 1 Programming Environments
2
General information Niccolo` Battezzati (niccolo.battezzati@polito.it)niccolo.battezzati@polito.it web site: www.cad.polito.it/staff/battezzati (teaching section)www.cad.polito.it/staff/battezzati LABs schedule: WEDNESDAY 8:30 - 12:30 (LABINF)
3
Windows Programming MS Visual Studio 2005 IDE for Windows programming in several languages (C/C++ for us) with support for Win-32 APIs Project-based programming
4
MS Visual Studio To create a new project: 1. Win-32 API Console Application 2. C++ / Empty project Advices: 1. #include in each file that uses Win-32 APIs 2. #undef UNICODE before including 3. you can write both C and C++ code
5
Unix Programming Many different IDEs (Eclipse C/C++, Anjuta, Dev-C++, KDevelop)...... but also text-editor + makefiles
6
Makefiles Basics: 1. for each target there are compilation rules 2. rules are simple compilation commands 3. variables can be defined to improve generalization 4. use standard targets for good-practice programming
7
Makefiles - syntax target: [dependencies] rules Any simple identifier Compilation commands (gcc...) (can use variables) other targets that you need to execute first YOU MUST INSERT a TAB SPACE!!!
8
Makefiles - example 1 SRC = main.c compile: gcc $(SRC) -o my_first_program
9
Makefiles - standard targets all: executes all the targets to perform compilation clean: removes temporary files (objects, etc.) distclean: removes also the executables
10
Makefiles - example 2 CC = gcc SRC = main.c hello.c EXE = hello all: compile compile: $(CC) $(SRC) -Wall -o $(EXE) clean: rm -f *.o distclean: clean rm -f $(EXE) variables definition targets and rules
11
Access to shared locations On Windows: 1. Tools -> Map Network drive... 2. insert the share folder: \\cclix1\corsi\system- programming On Linux: 1. /export/home/corsi/system-programming
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.