Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

NIDAQmx 7.4 with Borland 6 C++ Builder

Hello,

  I am using the NI PCI 6225 M series DAQ board with NIDAQmx 7.4 driver.  I have used the ANSI C functions and the NIDAQmx.h and NIDAQmx.lib files associated with the ANSI C functions with no problem in Microsoft Visual C++.NET  (I am not using Measurement Studio)

  My problem is this: I am now porting over to Borland 6 C++ Builder and when I attempt to utilize the NIDAQmx.lib file I have been using all along I get the following linker error: [Linker Error] 'C:\PROGRAM FILES\BORLAND\CBUILDER6\PROJECTS\LOTIS\NIDAQMX.LIB' contains invalid OMF record, type 0x21 (possibly COFF)'

   Borland ships with a command prompt utility called COFF2OMF which I utilized on the NIDAQmx.lib   This utility, while it eliminated my linker error, now produces a runtime error:  "This application has failed to start because NICAIU.DLL was not found.  Re-installing the application may fix this problem."

    What solutions do you have to make NIDAQmx.7.4 compatible with Borland 6 C++ Builder?  Have you folks devised a library that will correctly link to my program?

Thank you

Olyvia
0 Kudos
Message 1 of 19
(5,474 Views)
Hi Olyvia,

While the NI-DAQmx drivers are officially supported in the Borland C++ compiler, some customers have had success using the DAQmx import libraries that get installed with CVI support.  I'm not sure if you have seen the KnowledgeBase article here (which I think you may have since you are able to get thigns working in), but that is a good starting point.  Also, a couple of other customers have had success and posted their tips in this discussion forum thread.  This is all with DAQmx 7.5 and 8.0 though, there may be some differences.

Thaison V
0 Kudos
Message 2 of 19
(5,461 Views)
Thank you Thaison V, I had some luck using the tips provided in this post http://digital.ni.com/public.nsf/websearch/B09727F89DA3A06C86256F430071D88E?OpenDocument

I am using the v74 zip file with my DAQmx7.4 and things seem to be working fine so far.  Thanks again!

Olyvia
0 Kudos
Message 3 of 19
(5,453 Views)
I have dawnload NIDAQmx.lib80.zip .But there are some errors when i used it with NIDAQmx8.0 drever .ERROR:Access Violation at address 6d8a8fcc in module 'nicaiu.dll',Read of address EEEEEEEE.WHY?
 
 
Thank you!
0 Kudos
Message 4 of 19
(5,400 Views)
Hello wuducookie,

It sounds like the error might be caused because of the calling convention used by your compiler.  The two different calling conventions are stdcall and cdecl.  The difference between the two is that in the cdecl calling convention, the called function is responsible for cleaning up the stack, while in the stdcall calling convention, the calling function is responsible for cleaning up the stack.  Try changing this setting in your compiler to see if it fixes the errors.  Just a thought...

Travis G.
Applications Engineering
0 Kudos
Message 5 of 19
(5,377 Views)
Hello Travis G:
 
   Thanks for your help!
   I am so sorry that I had  expressed myself uncorrectly.
   The ERROR is that I can not pass the link when I used the   NIDAQmx.lib80.zip.  It says  "  [Linker Error] 'F:\NewCadDll\NIDAQMX80\NIDAQMX.LIB' contains invalid OMF record, type 0x21 (possibly COFF)  ".   But I can pass the link when I used the   NIDAQmx.lib74.zip,and when I run my GGG.exe ,SAYS "ERROR:Access Violation at address 6d8a8fcc in module 'nicaiu.dll',Read of address EEEEEEEE." . FINISH!
   I think if the  NIDAQmx.lib80.zip is wrong?
   Thank you all the same !
 
    Good Luck!
                                                                                                                            wuducookie
0 Kudos
Message 6 of 19
(5,367 Views)
Hey wuducookie,

I don't know if you've tried this or not, but try including the support files in your project that are attached to the following Knowledgebase:

KB 38RALVGP: Using Traditional NI-DAQ 7.x with Borland C++, I receive Error: NIDAQ32.lib contains in...

Let me know if this works.  I would be interested to know if these files are still compatible with the newer NI-DAQmx 8.0 driver.

Regards,
Travis G.
0 Kudos
Message 7 of 19
(5,346 Views)

Hello friend:

 I have a try with nidaq32b.lib ,but the same questions.  I think NIDAQ8.0 does not support the "nidaq32b.lib". Am I right?

0 Kudos
Message 8 of 19
(5,321 Views)

Hello everybody:

There is a question about daqmx8.0 programming  with boland c++ builder ! 

 The lib file "daqmx.lib"  is always not  fit  for bcb! why?

thanks for  your attention!

0 Kudos
Message 9 of 19
(5,283 Views)

Wuducookie,

DAQmx 8.0 does not officially support, nor has been tested with Borland C++. So though it may be possible to use some of the techniques mentioned in previous posts to get it to work, it is not something that DAQmx 8.0 was designed to do.

Is there any particular reason that you need to use Borland C++? There may be some other options that would suit your needs. Let us know what your end goal is, and what you need from your programming environment and we may be able to offer some other options for you.

Regards,
-GDE

0 Kudos
Message 10 of 19
(5,273 Views)