Hi All,

Short story: How do you compile two .cpp files at once?

Text excerpt: "Step-by-Step 4-1: 1. Open apstring.cpp and stringex.cpp into a project in your compiler. The file apstring.h must also be available to your compiler."

All three files are downloaded from the Instructor's Text Resources of my online class' website and saved to the appropriate directory on my computer.

Is it a common capability of a C++ compiler to be able to compile two, or more, files at the same time? If someone knows how to do so - common or otherwise - the info would be greatly appreciated!


Long story: (No additional significant info, but if you like to know the explicit details...) I have a chapter exercise that I don't have a clue about how to start, and I'm wondering if anyone here can point me in the right direction. It's a "Step-by-Step" type of deal, in that the text provides more information as the exercise progresses, but I'm stuck on step one! I've got an IM into my instructor, but since he hasn't answered in over two hours I figured I'd try here. All of the pertinent info is up above, in the "Short story". I'm barely two pages into the chapter and I've re-read it several times and there is no reference to any sort of "project" capability with the compiler (Digital Mars (TM) C++ compiler, free version - my instructor advises that they use the free version because, yep, you guessed it, it's free! The draw back is that it doesn't come with any documentation, which if I want said documentation, my instructor confirmed I would have to by the CD from DM's website. This riles me up as I don't want to spend $29.00 for something that I feel should have come with the course materials to begin with, and that I have a sneaking suspicion very possibly won't cover this specific issue anyway!...ok, sorry for venting. :mad: ).

Any suggestions - besides, waiting for my instructor's response, getting a different compiler or purchasing the DM's CD - woud be greatly appreciated! :)

Recommended Answers

All 3 Replies

Short story: How do you compile two .cpp files at once?

Okay I will go with the short story.

You RTF(ine)Manual.
Well any decent compiler should be able to compile multiple source files at once. You should be able to compile it by dmc sourcefile1.cpp sourcefile2.cpp , without any trouble for simple files.

Okay I will go with the short story.

You RTF(ine)Manual.
Well any decent compiler should be able to compile multiple source files at once. You should be able to compile it by dmc sourcefile1.cpp sourcefile2.cpp , without any trouble for simple files.

:cool: looks like that worked - had my doubts at first, since there's a space between the two file names; figured the compiler would only recognize the first file - I'll have to finish the exercise to see what it actually does... thanks for the info! :)
long story? no manual - until now! :cool: thanks! :) (btw, STILL no answer from my instructor! :mad: )

Just got a reply message from my instructor - and now I've got a wee bit of egg on my face!!! :( He had a link on the course website detailing everything I needed to know, and then some, right from the get go! :o I guess all isn't for naught, since WolfPack hunted down the DMC++ compiler documentation!

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.