954,496 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

C++ How do you create multifile project

Exactly how do you create multi-file project and how do you compile it in C++ using Linux?

djbsabkcb
Junior Poster in Training
92 posts since Jun 2005
Reputation Points: 14
Solved Threads: 0
 
Exactly how do you create multi-file project and how do you compile it in C++ using Linux?

EZ way, by using some IDE like this .

Not so EZ way (but you will learn a lot), by using makefiles as described here and in other sources.

Alvein
Junior Poster
104 posts since Jul 2005
Reputation Points: 12
Solved Threads: 4
 

A programmer that says an editor is the answer...geesh. The answer is with the include statment with something like this...

#include "fileToInclude.cpp"


For more info just look up the uses of the include in C/C++

Sauce
Junior Poster in Training
55 posts since Jul 2005
Reputation Points: 10
Solved Threads: 0
 

[High Guard]Just follow the links before start typing nonsenses.

The 2nd one will TEACH you what the #include directive is intended for.[/High Guard]

Alvein
Junior Poster
104 posts since Jul 2005
Reputation Points: 12
Solved Threads: 4
 

Hello,

You might also wish to look up and how to write makefiles. Unfortunately, I do not remember the exact sequence anymore, as I have moved on to system administration instead of programming, but makefiles can really make your life easier.

Christian

kc0arf
Posting Virtuoso
Team Colleague
1,937 posts since Mar 2004
Reputation Points: 121
Solved Threads: 57
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You