Googles appar
Huvudmeny

Post a Comment On: cbloom rants

"05-05-09 - AutoReflect"

7 Comments -

1 – 7 of 7
Blogger Sam said...

How did you do a global pre-build event in a solution with multiple projects? I wanted to do a global post-build in VS2005 but there doesn't seem to be any way (and googling returned nothing useful) so I created a project which depends on all other projects and put my post-build in there.

May 5, 2009 at 6:21 PM

Blogger cbloom said...

It's just a pre-build on each project, which is fine for me because the project dependencies do the right thing.

Another option I just thought of is I could actually have a watcher app that just runs all the time and watches the whole source tree and insta-builds aups any time you change a cpp.

May 5, 2009 at 6:25 PM

Blogger cbloom said...

I should say clearly when I wrote "global" I meant "on the project" as opposed to being a pre-build associated with cpp, or putting the autogen'ed files in the project and giving them custom build steps. (I don't add the autogen'ed files to the project at all)

May 5, 2009 at 6:27 PM

Blogger won3d said...

I think in newer VSes, there is a way to have custom build steps based on the file extension. Some stuff on it here:

http://msdn.microsoft.com/en-us/library/aa730877(VS.80).aspx

May 5, 2009 at 7:50 PM

Blogger spinlock said...

For my reflection I use a set of macros which setup instances of descriptor classes at cinit, whoring the hell out of offsetof(). (much like http://garret.ru/reflect-103.zip - not the pdb reading one :o ) - you need one duplication of the member names you want to reflect, but it avoids external build utils.

May 6, 2009 at 11:31 AM

Blogger cbloom said...

spinlock, yes that method is quite common.

I believe the Reflection method is massively preferable for various reasons that I have written about previously.

May 6, 2009 at 1:14 PM

Blogger castano said...

Thanks for sharing that!

May 7, 2009 at 4:54 AM

You can use some HTML tags, such as <b>, <i>, <a>

This blog does not allow anonymous comments.

Comment moderation has been enabled. All comments must be approved by the blog author.

You will be asked to sign in after submitting your comment.