Keil Logo

GENERAL: PASSING DEFINITIONS IN THE COMPILER INVOCATION LINE


Information in this article applies to:

  • C166 4.x
  • C251 3.x
  • C51 6.x
  • µVision2 Version 2.20a

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 ()\")

Last Reviewed: Wednesday, April 10, 2002


Did this article provide the answer you needed?
 
Yes
No
Not Sure
 
  Arm logo
Important information

This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies.

Change Settings

Privacy Policy Update

Arm’s Privacy Policy has been updated. By continuing to use our site, you consent to Arm’s Privacy Policy. Please review our Privacy Policy to learn more about our collection, use and transfers
of your data.