Digital I/O

cancel
Showing results for 
Search instead for 
Did you mean: 

Visual C Linker Error

I'm using a NI 6601 daq card to setup a simple test in microsoft visual c++ v. 6.0 to read/write one channel at a time, but am having problems getting the example source code to compile. i've added nidaq32.lib to the project, as well as the necessary header files (nidaq.h, nidaqex.h, nidaqmx.h) and keep getting an unresolved external linker error.
i've had to use library setups like this in the past (computerboards manufacturer), but have somehow managed to work past the linker error, but can't seem to find out what i must be forgetting to include or do to get this example code to compile. from what i remember, the linker error disappeared after i added the .lib file to the project, but that does not seem to be the case this time.
the linker error returns with the problem being in the DAQmx*** function calls (DAQmxCreateTask, etc)
has this also happened to anyone else or is there something simple that i am neglecting to handle?
Thanks in advance,
Raymond
0 Kudos
Message 1 of 4
(2,501 Views)

oops, update-- the previous card i used was actually a NI product, but a simpler card; i think it was only a dio card, whereas this 6601 has a built in clock

another update is that the card's software now won't read the card properly, so there may be a hardware/driver issue-- would this prevent the software from compiling?  i always thought that it would at least compile properly even if the card is not present in the system.

Thanks Again,

Raymond

0 Kudos
Message 2 of 4
(2,500 Views)
Hello Raymond,

I think the reason you were getting linking errors is because you were not including the DAQmx type library.  The library you are including is for the Traditional DAQ API.  Here is a link with some more detailed information.  The link will also tell you where to find the DAQmx Help file for Visual Basic 6 and I would suggest taking a look at that.

I'm not sure if the current behavior you are seeing would affect the compilation of your program.  It might be a problem if you are missing some driver files or something like that.  I would work on getting the board up and running in Measurement and Automation Explorer first, and then take a look at what I mentioned above to aid in your VB 6 development.
Eric
DE For Life!
0 Kudos
Message 3 of 4
(2,488 Views)
E-- i think you are right! we're still having problems making a new project from scratch, but i spoke with a tech support representative yesterday and he suggested using the project file from the samples included in the cd, and it seems to be working ok now.
it's still kind of annoying that we can't make a new project from scratch yet, although i think i'll have to spend some more time tomorrow fiddling around with project settings and projects from scratch... i think one thing my coworker realized what we were doing was mixing and matching the traditional and mx library files!! that was probably my fault, i hadn't realized there was a traditional set of libraries as well as the MX versions (the last time i wrote software for ni cards was with the older cbw files), but we do have a semi working test program now which is good...
we're having other problems with data processing tho, but that's strictly algorithmic right now...
 
thanks a lot for your response! it solidified what we've been seeing the past two days, i'll try and update if we find any new discoveries,
raymond
0 Kudos
Message 4 of 4
(2,483 Views)