Sign in to follow this  
agottem

Generating header dependencies from source

Recommended Posts

Hello - I know using gcc, there's a -M option to generate header dependencies from a source file. There's also the Unix tool "Makedepend", which can do the equivalent. Does anyone know of a way to do this using tools that ship with visual studio? I'm working with a fairly large project which is built using nmake and Makefiles. If there isn't a way to do this through visual studio build tools, is there a win32 version of Makedepend? Thanks for your help, Andrew

Share this post


Link to post
Share on other sites
The /showincludes compiler option will output all the header files which are pulled in. You just need to parse it a bit.

Share this post


Link to post
Share on other sites
/showIncludes does exactly what I was looking for! Thanks for the pointer.

Unfortunately, the implementation seems kind of crappy, and difficult to use (compared to makedepend). It does look like there's a win32 version of makedepend here: http://unxutils.sourceforge.net/ which I'll probably just end up using.

Thanks for your help,
Andrew

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this