View Single Post
  #1 (permalink)  
Old September 13th, 2006, 03:29 AM
prashanth_a18 prashanth_a18 is offline
Registered User
 
Join Date: Sep 2006
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default interfacing hardware through gpib

#include <windows.h>
#include <string.h>
#include <stdio.h>
#include "WINDECL.H"
#include<stdlib.h>
//#include "decl-32.h"

/* Size of ibrd buffer */
#define BUF_SIZE 256
#define DEV_NAME "SMH"


/* Misc */
#define FALSE 0
#define TRUE 1
#define TIMER_NUM 1

int main()
{
    int device;
    char buffer[100];
    int InitMeter(char *devname);
    device = InitMeter(DEV_NAME);
    //ibwrt(device, "RF?" , 100);
    //ibrd (device, buffer,100);
    //printf("RF=%s \n",buffer);
    return 0;
}


int InitMeter(char *DevName) {
     int device;
     device = ibfind(DevName); /* Open the device */
     printf("device=%d\n",device);
     return (device);
}

i am attaching my code in this form.I am interfacing a signal generator using gpib bus.when ever i run this code,i am getting a error as mensioned below.could any 1 please help me out in this issue.

  [Linker error] undefined reference to `ibfind@4'
  ld returned 1 exit status
 E:\Dev-Cpp\Examples\Makefile.win [Build Error] [devc++test.exe] Error 1 .

Waiting for ur favourable reply

Reply With Quote