Thread: Re-Writing Instrumentation (GPIB) C Program In Eclipse (using MiniGW) in Windows 7

  1. #1
    Registered User
    Join Date
    Aug 2012
    Posts
    10

    Wink Re-Writing Instrumentation (GPIB) C Program In Eclipse (using MiniGW) in Windows 7

    Hello Community!

    I'm trying to re-write a program which is used to control GPIB measurement instrumentation. I know electronics but unfortunately I know very little programming .

    I'm currently using Eclipse as my IDE and I'm using the National Instruments 488.2 API with the MiniGW compiler for Windows 7.

    I'm carefully compiling after every header and library I include. Unfortunately I've hit a declaration (or title, not sure) that is not compiling.

    Code:
    Addr4882_t Instruments[32],            // Array of primary addresse
    I have attached the original code 4882query.c for reference along with a screenshot and the header file.

    Any guidance or help would be greatly appreciated.

    Thanks again!
    Attached Images Attached Images Re-Writing Instrumentation (GPIB) C Program In Eclipse (using MiniGW) in Windows 7-addr4882_error-png 
    Attached Files Attached Files

  2. #2
    Registered User
    Join Date
    May 2009
    Posts
    4,183
    Try using a semicolon ";" instead of a "," after the variable loop.

    Tim S.
    "...a computer is a stupid machine with the ability to do incredibly smart things, while computer programmers are smart people with the ability to do incredibly stupid things. They are,in short, a perfect match.." Bill Bryson

  3. #3
    Registered User
    Join Date
    Jun 2011
    Posts
    4,513
    This line is in the header file:

    Code:
    typedef short Addr4882_t;
    This might or might not work, but have you tried copy+pasting this line directly in the .c file directly below the #defines?

  4. #4
    Registered User
    Join Date
    Aug 2012
    Posts
    10
    Quote Originally Posted by stahta01 View Post
    Try using a semicolon ";" instead of a "," after the variable loop.

    Tim S.
    Should I add it even though the next line has a semi-colon?

  5. #5
    Registered User
    Join Date
    Aug 2012
    Posts
    10
    Quote Originally Posted by Matticus View Post
    This line is in the header file:

    Code:
    typedef short Addr4882_t;
    This might or might not work, but have you tried copy+pasting this line directly in the .c file directly below the #defines?
    This compiled!,

    Thanks!
    Attached Images Attached Images Re-Writing Instrumentation (GPIB) C Program In Eclipse (using MiniGW) in Windows 7-addr4882_ok-png 

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Portable instrumentation
    By Kempelen in forum C Programming
    Replies: 1
    Last Post: 08-08-2012, 10:12 AM
  2. Eclipse gcc/g++ run program Warnings
    By geewhan in forum C++ Programming
    Replies: 6
    Last Post: 06-28-2012, 10:39 PM
  3. SDL library on eclipse (windows)
    By chiefblink117 in forum C Programming
    Replies: 1
    Last Post: 09-26-2011, 09:41 PM
  4. GPIB / IEEE 488 programming
    By nbo10 in forum C++ Programming
    Replies: 1
    Last Post: 08-27-2003, 01:52 PM

Tags for this Thread