Skip to content

cisc220/more-modules

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Creating C++ modules

I want to demonstrate several ways of building multi-file C++ projects.

You do know how to just compile the *.cpp files already.

g++ main.cpp teacher.cpp student.cpp monk.cpp -o the_world
./the_world

That will do the job. But now I want to demonstrate creating object files, *.o:

g++ -c teacher.cpp
g++ -c student.cpp
g++ -c monk.cpp
g++ -c main.cpp
g++ main.o teacher.o student.o monk.o -o the_world
./the_world

Finally we can use a Makefile:

make
./the_world

Follow the notes to see some tasks to interact with this material.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published