cancel
Showing results for 
Search instead for 
Did you mean: 

C question

 
SOLVED
Go to solution
Willem Grooters
Honored Contributor

C question

Sorry for this stupid question but I'm not familiar with C in this depth.

This sniplet does NOT compile, and I don't know how to get around this.

#include
int CgiLibVarByDesc (struct dsc$descriptor*, struct dsc$descriptor*, ...);
int BPS_CgiLibEnvironmentName (struct dsc$desriptor*) ;

compilation gives a result as in the attachement.
My guess is that the use of "struct dsc$descriptor" in the first routine causes the problem, but how can I get around this so I can get rid of these errors?
Willem Grooters
OpenVMS Developer & System Manager
5 REPLIES
Ian Miller.
Honored Contributor

Re: C question

Is the
#include

within a function ?
____________________
Purely Personal Opinion
Willem Grooters
Honored Contributor

Re: C question

No, in the top of the program (like in the sniplet - that one gave the listing)
Willem Grooters
OpenVMS Developer & System Manager
Kris Clippeleyr
Honored Contributor
Solution

Re: C question

Willem,

In the prototype of BPS_CgiLibEnvironmentName, you specified "dsc$desriptor" instead of "dsc$descriptor". You've missed the character "c".

Regards,
Kris (aka Qkcl)
I'm gonna hit the highway like a battering ram on a silver-black phantom bike...
Willem Grooters
Honored Contributor

Re: C question

You need someone at hand, once in a while, to note this kind of so easily overlooked stupidities.
Oh well ....
(Why doesn't the compiler give a more descriptive message?)
Willem Grooters
OpenVMS Developer & System Manager
Hein van den Heuvel
Honored Contributor

Re: C question

>>> Why doesn't the compiler give a more descriptive message?)


That's a joke right?

If not, please explain what the compiler could possibly have done better than pointing you to the EXACT SINGLE WORD which was incorrect.
1) Oh... maybe you wanted that '3' under the character where a typing error was made?
2) or... you wanted the compiler to report: "you wrote tets, but probably meant test"

Without 'reading your mind' it seems to me the compiler was as helpful as it possibly could be.

Groetjes,
Hein.