Menu

Windows configuration: TEXT() macro

versat
2017-12-19
2018-01-03
  • versat

    versat - 2017-12-19

    Hi,
    i stumbled over code with TEXT("foo") macros and wanted to add it to the windows library.
    But since it depends on the UNICODE setting it is maybe not simply straight forward.
    The macro is defined like this in a windows header:

    #ifdef  UNICODE
    #define __TEXT(quote) L##quote
    #else
    #define __TEXT(quote) quote
    #endif
    
    #define TEXT(quote) __TEXT(quote)
    

    Is it possible to configure this correctly or can i just add the line

      <define name="TEXT(str)" value="str"/>
    
     
  • versat

    versat - 2018-01-03

    Related PR which adds this define: https://github.com/danmar/cppcheck/pull/1019

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.