cancel
Showing results for 
Search instead for 
Did you mean: 

aCC compilation problems

 
Highlighted
Frequent Advisor

aCC compilation problems

I am working through the 32/64bit interoperabilty examples of:

http://h21007.www2.hp.com/portal/site/dspp/PAGE.template/page.document?ciid=4409276391695110VgnVCM100000275d6e10RCRD

My system is an rx running 11.23 and aCC version HP aC++/ANSI C B3910B A.06.00

as an example, I get tons of errors when compiling the code shmcrt.c of the above link. Any usage notes would help, I would have expeceted it to be fairly normal C.

TIA
2 REPLIES 2
Highlighted
Honored Contributor

Re: aCC compilation problems

I'd try to avoid anyone who uses a macro
like that "USAGE", but the big problem seems
to be the missing "\" characters on those
lines:

#define USAGE {\
fprintf(stderr, "usage:%s size [-s] \n",argv[0]);\
[...]

without which, you have a one-line macro
definition, followed by a bunch of code in
the middle of nowhere. (Note that the first
complaint refers to line 14, the one after
the "#define".)


> "shmcrt_l.c", line 46: error #2007: unrecognized token
> case `s':
^

> "shmcrt_l.c", line 46: error #2008: missing closing quote
> case `s':
^
Time for an "Introduction to C" course?
Try >'s'< instead of >`s'<.
Highlighted

Re: aCC compilation problems

A.06.00 is no longer supported. The latest version is A.06.16. With newer versions of aCC6, you have the +w64bit option to flag these porting issues.

Unfortunately your other issues, as pointed out by Steven, are due to bad formatting on that web page. Though only one line in the USAGE macro is missing the "\" because the line was split. You seemed to lose the others. Please provide feedback on your issues by clicking on the "Contact us" link on the bottom of the page.

Other minor points to mention on your feedback:
That should be "int main" and "return 0;".
There are other cases of "`" vs "'".