New user so hopefully once I get some help setting up I'll be OK .

#include <ddk\usbiodef.h>
#include "Setupapi.h"

In the source I'm referencing &GUID_DEVINTERFACE_USB_DEVICE as an arg in SetupDiGetClassDevsA().  I added the lib file, and I now get this in my log file:

C:/Proj/test01/main.cpp:22: undefined reference to `_GUID_DEVINTERFACE_USB_DEVICE'

Is the underscore just typical mangling?  This GUID_DEVINTERFACE_USB_DEVICE is defined in usbiodef.h, but I haven't a clue what lib it's found in.  I tried including all the MingW lib files but even that didn't work.

gcc-core-3.4.5-20060117-1-vista.tar.gz
gcc-g++-3.4.5-20060117-1-vista.tar.gz
mingw-runtime-3.14.tar.gz
mingw32-make-3.81-2.tar.gz
mingw-utils-0.3.tar.gz
w32api-3.11.tar.gz
binutils-2.18.50-20080109.tar.gz
gdb-6.7.50.20071127-mingw.tar.bz2

Let me know if any other info is needed.  Thanks much.

SG