handover #DEFINEs from the Command-Line

rossi
2006-10-14
2013-03-12
  • rossi

    rossi - 2006-10-14

    Hello together,

    i do have a c-code in whis is for example defined:

    #DEFINE __z_

    #IFDEF __z_
       A=1234;
       B=5678;
    #ELSE
       A=0000;
       B=0000;
    #ENDIF

    To compile the source, i use a batch which should create me two versions of a .bin-file. One with __z_ and one without __z_. Currently i change the source through making the #DEFINE as a comment, save it and compile it again.

    But therefore it should be given to me to set this tag __z_ from the command line. Do i have any possibility to do this?

    Thx,
    olly...

     
    • Maarten Brock

      Maarten Brock - 2006-10-14

      Have a look in the manual under "Preprocessor Options" option -D.

       
    • rossi

      rossi - 2006-10-15

      Thanks Maarten, that was a pretty good hint. I didnt think that it could be a "macro". Now all works fine.

      cu,
      olly...

       

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.





No, thanks