.h to .d advice needed

Don Clugston dac at nospam.com.au
Tue Aug 8 06:50:49 PDT 2006


NEmp wrote:
> I changed it to:
> 
> const DAQmxSuccess=0;
> 
> bool DAQmxFailed(int error){
>  if (error<0) return true;
>  return false;
> }
> 
> And changed your code with:
> throw new StringException()
> 
> So now I get this error:
> C:\Program Files\...\NIDAQmx.lib
>  Error 43: Not a Valid Library File
> :D
> I'm beginning to get this feeling that maybe everything was for nothing :(

Not at all. I've been using NI-DAQmx with D for months. I can confirm 
that it works perfectly after translation. I'd post you my translation, 
except that would probably violate NI's copyright restrictions.

You need to run the 'coffimplib' program (download from Digital Mars) on 
NIDAQmx.lib, to turn it from a Microsoft-format import lib into Digital 
Mars/Watcom/etc format.

BTW, the reason all those #defines are duplicated is that they really 
should have been enums.

Good to see another NI user.



More information about the Digitalmars-d-learn mailing list