Skip to main content
GameDev.net gamedev.net
🔒 Locked

Batch compiling

Started by jtech Apr 7, 2002 at 11:02 PM 6 replies 500+ views
Original Post
jtech
jtech
I hope this isn''t a newbie question, but I can''t figure out how to do it. I have about 20 or so little programs I wrote in MSVC++, and I want to compile all of them at once. They are all separate projects in different directories. Is there anyway to create a batch file or macro in MSVC++ to compile multiple projects?
jtech
jtech
Ok, now I have 20 makefiles...

I still don''t know what to do with them. I want to
execute them all at once, not just one.
Martee
Martee
The basic idea is that you want to have one makefile in each project directory (that's what your 20 makefiles do), and one top-level makefile which runs make in each subdirectory. There are other ways to do it (e.g. includes), but this is the simplest.

[edited by - Martee on April 8, 2002 9:12:13 PM]
ReactOS - an Open-source operating system compatible with Windows NT apps and drivers
jtech
jtech
Ah, wait a minute. You mean I can create a new dummy project,

then add all my 20 makefiles into this dummy project. Then compile the dummy project.

And each program, wherever it is, will be compiled?

I have to try this out. I though these were MS-DOS batch files or
something.

Thanks in advance.
jtech
jtech

Well, this is not working. These makefiles are totally useless
as far as I can tell.


This works for me:

1. Go the File menu and create a new "Blank Workspace".

2. Under the Project menu, click on "Insert Project into Workspace..."
Include all of the projects you want.

3. Go the Build menu, and click on "Batch Build..."
Then check off all the builds you want to compile.


Presto!

You don''t have to play around with Project settings or
anything else. They should be build exactly how you set them up
previously.
blahpers
blahpers
Coincidentally enough, I just did something similar about an hour ago. I have several independent but related projects in one workspace, and I want to be able to build them all at once (or, for transport reasons, clean all their builds at once).

My solution was to do a File|New|Project|Utility Project called "_all", then Project|Dependencies and check off all the other projects.

Dunno if that''s the best solution, but it works for me so far.

---
blahpers
---blahpers
jtech
jtech
"The utility project does not generate any predetermined output files
(such as a .Lib, .Dll or .Exe). It can be used as a container for
files that you want built without a link step."


I was able to do the same "Insert Project into Workspace..." and
"Batch Build..." with an utility project too.


The only thing I don''t like about doing the "Insert Project into Workspace..."
step is that if I add or remove a file outside this do-all project setup,
I would probably have to delete that specific project and re-insert it
again.

Anway, it works.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.