Thanks to all of you in this thread. Without official gcc support from NI, these postings have proven to be an invaluable resource.
I had to do things a bit differently, so here's the details:
1) copy nidaqmxbase.dll to a working directory, in my case:
C:\Program Files\National Instruments\NI-DAQ\DAQmx ANSI C Dev\lib\gcc
2) Execute pexports to generate .def file:
http://www.emmestech.com/moron_guides/moron1.html has useful info on using microsoft dlls with cygwin/mingw
/cygdrive/c/Program\ Files/pexports-0.43/bin/pexports.exe nidaqmxbase.dll | sed 's/^_//' > nidaqmxbase.def
3) Use dlltool to create libdaqmxbase.a
dlltool --input-def nidaqmxbase.def --dllname nidaqmxbase.dll --output-lib libnidaqmxbase.a -k
4) Link and build with the appropriate directories -I and -L in your Makefile, or copy the .a to a directory in your path
- I/cygdrive/c/"Program Files"/"National Instruments"/"NI-DAQmx Base"/Include
-L"/cygdrive/c/Program Files/National Instruments/NI-DAQ/DAQmx ANSI C Dev/lib/gcc"
(hmm, just noticed I'm including the header from Base, and put my .a in NI-DAQ, might edit this post later if I clean things up)
5) I had to switch the driver in the System->Hardware->Device Manager to NI-VISA USB Devices->NI USB-6501 24-line Digital IO
I was getting DAQmxBase Error -200220: <err>Device identifier is invalid. Then I found the following link. After this, things seem to be working fairly swimmingly.
http://digital.ni.com/public.nsf/allkb/64BA7A1D64D3D5518625726D0066A780?OpenDocument
Though I still get warnings about uInt32 and int32 -- I think a couple of typedefs should take care of it.
Please let me know if you find some glaring error, or have a better solution.