×

Discussion Board

Results 1 to 4 of 4

Thread: MACRO

  1. #1
    Registered User
    Join Date
    Jun 2010
    Posts
    9

    MACRO

    I am trying to define pre-processor directives in my code through MMP files.
    MACRO var is used to define a macro named var.But I was wondering how do we define macros who have some values.

    like for GCCE we can use -Dvar=\"value\" this works like #define var "value"
    WINSCW also works with -d var=\"value\"

    but my problem is i dont know how to pass these parameters to comiler using MMPs.
    I tried

    OPTION CW -dialect c99 -inline on -d var="2"
    OPTION GCCE --std=gnu99 -Dvar="2"

    but all " symbols are removed when Symbian build system parses them..I have also tried escaping them using \" but no gain. Please Help

  2. #2
    Nokia Developer Moderator
    Join Date
    Feb 2006
    Location
    Budapest, Hungary
    Posts
    28,568

    Re: MACRO

    MACRO also accepts value
    Code:
    MACRO var 2

  3. #3
    Registered User
    Join Date
    Jun 2010
    Posts
    9

    Re: MACRO

    i tried
    MACRO var "value"

    but finally in the project.WINSCW file it gets converted to -d "var" -d "value"

    what i want is to convert during preprocessing

    var to "value"

    Please mind the quotes...i want to use var as a const char *.

    So the problem with MACRO var 2 is it defines two macros one with name var and other named 2

  4. #4
    Nokia Developer Moderator
    Join Date
    Feb 2006
    Location
    Budapest, Hungary
    Posts
    28,568

    Re: MACRO

    Ok, I forgot the =, so it should have been
    Code:
    MACRO var=2
    you can try the "-s too.

Similar Threads

  1. MACRO vs DEFINE
    By er_benji in forum Symbian
    Replies: 7
    Last Post: 2008-03-26, 08:07
  2. how to copy macro
    By pistha in forum Symbian
    Replies: 2
    Last Post: 2007-07-24, 18:32
  3. Help about macro - EKA2
    By Aspen in forum Symbian
    Replies: 5
    Last Post: 2007-04-25, 10:47
  4. Which build macro to use?
    By gmsk19 in forum Symbian
    Replies: 2
    Last Post: 2007-03-12, 11:25
  5. Macro
    By coxcom in forum Carbide.c++ IDE and plug-ins (Closed)
    Replies: 1
    Last Post: 2006-04-11, 12:53

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •