Measurement Studio for VC++

cancel
Showing results for 
Search instead for 
Did you mean: 

Obj. Error when compiling multiple C odules ncluding the nidaqex.h header file

This is a C implementation.

I have two modules. The main program includes a call nidaqex.h . My second module is shown below. cedriver.h is simply another header that contains the counter variables and function definitions.

When I attempt to compile both source and the module I get the following errors:

cedrivercomputeoutput.obj .text: undefined reference to '_GPCTR_Control@12'
cedrivercomputeoutput.obj .text: undefined reference to '_NIDAQErrorHandler@12'
cedrivercomputeoutput.obj .text: undefined reference to '_GPCTR_Set_Application@12'
cedrivercomputeoutput.obj .text: undefined reference to '_GPCTR_Change_Parameter@16'
cedrivercomputeoutput.obj .text: undefined reference to '_GPCTR_Watch@16'

It seems as though the functions from the nidaqex header file are not being recognized. Any ideas?

Attached is the module to be compiled with the main source code. I am using the commands xxx main.c cencoderdrivercomputeoutput.c . The main program also just calls the functions at predetermined times.


/* ================================
/ edriver.h
/ ================================*/

#include "nidaqex.h"

extern u32 GpctrNum_0 = ND_COUNTER_0;
extern u32 GpctrNum_1 = ND_COUNTER_1;
extern i16 iDevice = 1;
extern u32 ulGpctrNum = ND_COUNTER_0;
extern u32 ulCount = 0;
extern i32 ulTCReached = ND_NO;
extern i16 iIgnoreWarning = 0;
//i16 iYieldON = 1;
extern i16 iRetVal = 0;

u32 ReadCounter(void);
void SetupCounter(void);
void DisarmCounter(void);


TIA.

Klaus
0 Kudos
Message 1 of 4
(3,608 Views)
0 Kudos
Message 2 of 4
(3,596 Views)
I may not be including the file that contains the subroutines for these functions:

GPCTR_Control
NIDAQErrorHandler
GPCTR_Set_Application
GPCTR_Change_Parameter
GPCTR_Watch

nidaqex includes nidaq.h that contains the function prototypes. What file contains the actual function subroutines?

TIA

Klaus
0 Kudos
Message 3 of 4
(3,590 Views)
Found answers to my questions!!!!!

Missing nidaq32.lib and nidex32.lib.
0 Kudos
Message 4 of 4
(3,586 Views)