How to define a macro with space in its content?

Sysprogs forums Forums VisualGDB How to define a macro with space in its content?

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #13218
    Jimm Chen
    Participant

    I’d like to pass

    -D__int64="long long"

    to gcc, but VisualGDB 5.3r4 does not cope with it correctly. It does something like

    -D__int64=”long -Dlong”

     

    How can I achieve my goal?

    See my image below for this problem:

     

    #13219
    support
    Keymaster

    Hi,

    Please try using the \” syntax.

    #13220
    Jimm Chen
    Participant

    I tried it as follows, no luck.

    __int64=\"long long\"

    Could you confirm it for me?

    #13224
    support
    Keymaster

    Hi,

    Thanks, we have confirmed this. Looks like GNU Make  doesn’t properly handle values with spaces regardless of the escaping.

    As a workaround please try adding the following code directly to CFLAGS/CXXFLAGS:

    -D__int64="long long"
    • This reply was modified 6 years, 4 months ago by support. Reason: sample code encoding
    #13227
    Jimm Chen
    Participant

    OK. That’s quite feasible workaround.

    But please use ASCII dash and quotes in your answer, instead of their Unicode counterpart.

    #13231
    support
    Keymaster

    Hi,

    No problem, we’ve edited the previous reply to fix the encoding.

Viewing 6 posts - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.