ARM Technical Support Knowledge Articles

PASSING DEFINITIONS IN THE COMPILER INVOCATION LINE

Applies to: General Topics

Answer


Information in this article applies to:


QUESTION

I am trying to pass definitions in the invocation line of my Keil compiler exactly as it is mentioned in the manual:

C51 MYPROG.C DF (X1="1+5",iofunc="getkey ()")

However I always receive the following error message:

C51 FATAL-ERROR -
  ACTION:  PARSING INVOKE-/#PRAGMA-LINE
  LINE:    C:\KEIL\C51\BIN\c51.exe MYPROG.C DF(X1=1+
  ERROR:   ')' AFTER PARAMETER EXPECTED
C51 TERMINATED.

What am I doing wrong?

ANSWER

Windows 32-bit programs cannot 'see' quotation marks ('"') in the invocation. This is why the C-compiler misinterprets the command line.

There is a workaround. You must insert a backslash ('\') in front of each quotation mark. For example:

C51 MYPROG.C DF (X1=\"1+5\",iofunc=\"getkey ()\")

Article last edited on: 2002-04-10 00:00:00

Rate this article

[Bad]
|
|
[Good]
Disagree? Move your mouse over the bar and click

Did you find this article helpful? Yes No

How can we improve this article?

Link to this article
Copyright © 2011 ARM Limited. All rights reserved. External (Open), Non-Confidential