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