On Thursday 23 July 2009 07:23:05 Red Rackham wrote:
> New user so hopefully once I get some help setting up I'll be OK .
As an aside, please configure your mailer to post plain text only,
not multipart/alternative MIME, with plain text and HTML duplicates.
> #include <ddk\usbiodef.h>
This isn't a MinGW deliverable. If you have problems using it, best
ask those who provide it.
> #include "Setupapi.h"
> In the source I'm referencing &GUID_DEVINTERFACE_USB_DEVICE
So, you are referencing the address of some entity, defined by what
looks like a macro...
> 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
...but the macro appears not to be expanded in at least one of your
translation units, so the linker looks for that external symbol.
> Is the underscore just typical mangling?
All external symbols in MinGW GCC have an underscore prefaced to the
name used in the source.
> This GUID_DEVINTERFACE_USB_DEVICE is defined in usbiodef.h, but I
> haven't a clue what lib it's found in.
Since it's likely a macro, it wouldn't be in any.
> I tried including all the MingW lib files but even that didn't
No, it wouldn't. You need to determine why the macro isn't being