Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

compilation errors from decl-32.h

Hello:
I have the following configuration.

GPIB card: AT-GPIB PnP
: Win 95
: Borland C/C++ compiler
Interfaced instrument: Oscilloscope, HP54501A.

Using IBIC (interactive control), I am able to communicate with the device without porblems. I then tried to run the following program for getting the device ID.


#include
#include "decl-32.h"
#include
#include
#include

main()
{
int scope_id;

scope_id= ibfind("HPSCOPE");
printf("The address of hp oscilloscope is %d.\n",scope_id);
}

I compile this program using the following command:
bcc -w32 -j5 scope2.c Borlan~1.obj

and I get the follwing error message:

Borland C++ Versio
n 3.00 Copyright (c) 1991 Borland International
scope2.c:
Error decl-32.h 248: ) expected
Error decl-32.h 268: Declaration syntax error
Error decl-32.h 269: Declaration syntax error
Error decl-32.h 270: Declaration syntax error
Error decl-32.h 309: Declaration syntax error
Error decl-32.h 310: Declaration syntax error
Error decl-32.h 310: Too many error or warning messages
*** 7 errors in Compile ***

I looked at line 248 of decl .h but could not understand why it is causing the error.

I would very much appriciate any pointers on ths problem.

Thanking you.

Sinerely,

Giridhar.
0 Kudos
Message 1 of 3
(3,998 Views)
It's seems for me that there is a problem with you decl-32.h header ! Maybe
you have changed it ?
I attached you my header file !

I hope that help you !

Gorgo

"M. S. Giridhar" wrote in message
news:50650000000800000045400000-1012609683000@exchange.ni.com...
> Hello:
> I have the following configuration.
>
> GPIB card: AT-GPIB PnP
> : Win 95
> : Borland C/C++ compiler
> Interfaced instrument: Oscilloscope, HP54501A.
>
> Using IBIC (interactive control), I am able to communicate with the
> device without porblems. I then tried to run the following program
> for getting the device ID.
>
>
> #include
> #include "decl-32.h"
> #include
> #include
> #include
>
> main()
> {
> int scope_i
d;
>
> scope_id= ibfind("HPSCOPE");
> printf("The address of hp oscilloscope is %d.\n",scope_id);
> }
>
> I compile this program using the following command:
> bcc -w32 -j5 scope2.c Borlan~1.obj
>
> and I get the follwing error message:
>
> Borland C++ Version 3.00 Copyright (c) 1991 Borland International
> scope2.c:
> Error decl-32.h 248: ) expected
> Error decl-32.h 268: Declaration syntax error
> Error decl-32.h 269: Declaration syntax error
> Error decl-32.h 270: Declaration syntax error
> Error decl-32.h 309: Declaration syntax error
> Error decl-32.h 310: Declaration syntax error
> Error decl-32.h 310: Too many error or warning messages
> *** 7 errors in Compile ***
>
> I looked at line 248 of decl .h but could not understand why it is
> causing the error.
>
> I would very much appriciate any pointers on ths problem.
>
> Thanking you.
>
> Sinerely,
>
> Giridhar.



[Attachment Decl-32.h, see below]
0 Kudos
Message 2 of 3
(3,998 Views)
Hello Gorgo:
Thank you for sending me a copy of Decl-32.h. I checked and it is identical to what I have and I still am not able to compile my program. I re-installed the compiler and tried to compile the program using the command

bcc32 -j7 -Ic:\borland\bcc55\include Lc:\borland\bcc55\lib scope2.c borlan~1.obj

and this time I get the error message:

Borland C++ 5.5.1 for Win32 Copyright (c) 1993, 2000 Borland
SCOPE2.C:
Error E2303 decl-32.h 248: Type name expected
Error E2303 decl-32.h 268: Type name expected
Error E2303 decl-32.h 269: Type name expected
Error E2147 decl-32.h 309: 'LPCSTR' cannot start a parameter declaration
Error E2303 decl-32.h 310: Type name expected
Error E2303 decl-32.h 311: Type name expected
Error E2303 de
cl-32.h 312: Type name expected
Error E2228 decl-32.h 312: Too many error or warning messages
*** 8 errors in Compile ***

I have included windows.h.
Again, there seems to be a problem with line 248, but this time it says "Type name expected". Any idea why I am getting this error?

Thanking you for your help.
Sincerely,
-Giridhar.
0 Kudos
Message 3 of 3
(3,998 Views)