SGI Windows NT Toolbox

NT Development Tips, Tricks, Tools, and Hacks
[ Maintainer: Bob Kuehne, rpk@sgi.com, Updated: Tue Sep 08 08:38:23 1998 ]


Over the last few months, in helping some of my ISVs with NT issues, I've been coerced into learning a lot about the NT development environment through trial, lots of error, and plenty of gnashing of teeth. This page contains a compilation of some of these experiences so that you can avoid the high dental costs of my adventures. And the categories are...

If you find the stuff here useful, inaccurate, have other relevant links to be added, or just generally want to provide feedback, please do so by emailing me: rpk@sgi.com


Development Enviroment

The NT command-line is based around the MSDOS shell, which is an abomination of all things shell-ish. One redeeming feature is that it does have autocompletion if you set one (like tab which is '0x9') via the registry key:

HKEY_CURRENT_USER->Software->MicroSoft->Command Processor->Completion Char

However, that doesn't make it usable. For that to happen, I use two indispensable tools.

  1. For the UNIX->NT transition, the Cygnus GNUWIN32 tools which provide ls, cat, less, bash and a whole host of other common UNIX goodies, make the transition to an nt environment much less painful. Get it from their website: http://www.cygnus.com/misc/gnu-win32/
  2. If bash is not your cup-o-tea, and you prefer a more familiar IRIX shell, a version of TCSH which interoperates nicely with the above GNU-WIN toolset is available from: ftp://ftp.blarg.net/users/amol/tcsh/
Here's a mapping of common IRIX to NT development commands (most of which can be found in c:/Program\ Files/DevStudio/bin):
  • nm <filename> == DUMPBIN /SYMBOLS <filename>
  • elfdump -Dl <filename> == DUMPBIN /IMPORTS <filename>
  • ld == LINK
  • cc || CC == CL
  • make == nmake (though again, I recommend gnumake)

Parallel Compilation under NT

I've been raised using make -P (aka smake) on IRIX for years, and it's simple, elegant, and to the point. But now, under NT and VisualC++, it's surprising how much effort it takes to do parallel builds. Here's one way to do that:

  1. Get gnumake, and use it in 'gnumake -j <max-#-of-compiles>' mode. It's syntax is a bit different than that used by nmake, but on the plus side, it's gnu and runs anywhere, not just under Windows. Here's one location from which to snork it: ftp://labrea.stanford.edu/gnu/make-3.76.1.tar.gz
  2. Now, depending on the debug options you use, you must do one of two things:
    • If you're using the /Zi option, you must also use the /Fd filename> option to put the resulting .pdb files somewhere unique. I typically simply use the name of the source file with a .pdb extension. Why is this renaming goop necessary? Because the default name for a pdb file is vc50.pdb, and if two programs try to write to the same file, an access violation occurs, killing the offending application (in this case, the parallel gnumake), and zoinks, you're back to doing single threaded makes. Kind of a pain. Which is why I like the next option.
    • Use the /Z7 debug flag. Generate most of the same debug info, but without all the extra file rename hassle of the above method.

X Servers & Remote Display

Despite the vocal whiners that say all the good apps are on NT, I still have apps which run under X which are indispensable. To display these under NT, you need an X server, and fortunately there are several good ones out there:

I haven't yet found too many tools (free anyway) for remote display of nt, but here's what i have so far.

  • Virtual Network Computer lets you display and manipulate almost any desktop/os on any other os (and even display through java to a web browser). It's essential if you've ever wanted to do something to your nt box and you are now sitting across the hall, down the street, and upstairs from it, and at a mac. This tool will let you use the desktop like you were there (but a bit slower). And, best of all, it's GNU licensed and source is available too. Get it here: http://www.uk.research.att.com/vnc/

Miscellaneous Apps

Here are some apps which I've discovered which either look similar to UNIX apps or are just good ideas in general.

Miscellaneous Applications


Dev Docs


Links

The required link-to-more-info section.


Copyright © 1997-98, Silicon Graphics, Inc.