Maxon Developers Maxon Developers
    • Documentation
      • Cinema 4D Python API
      • Cinema 4D C++ API
      • Cineware API
      • ZBrush Python API
      • ZBrush GoZ API
      • Code Examples on Github
    • Forum
    • Downloads
    • Support
      • Support Procedures
      • Registered Developer Program
      • Plugin IDs
      • Contact Us
    • Categories
      • Overview
      • News & Information
      • Cinema 4D SDK Support
      • Cineware SDK Support
      • ZBrush 4D SDK Support
      • Bugs
      • General Talk
    • Unread
    • Recent
    • Tags
    • Users
    • Login

    Source Processor: Platform-dependent function signatures

    Cinema 4D SDK
    c++ r20
    2
    5
    837
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • fwilleke80F
      fwilleke80
      last edited by r_gigante

      Hi,

      the source processor is throwing an error for this constructor:

      #ifdef __APPLE__
      CBlowFish::CBlowFish(const unsigned char* ucKey, unsigned int keysize, const SBlock& roChain, bool backwardsCompatibility_) : m_oChain0(roChain), m_oChain(roChain)
      #else
      CBlowFish::CBlowFish(const unsigned char* ucKey, size_t keysize, const SBlock& roChain) : m_oChain0(roChain), m_oChain(roChain)
      #endif
      {
      ...
      

      The error is:
      error: Expected ',' or '{', found 'CBlowFish' instead.

      I know the source processor does not parse preprocessor statements, so yes, this might look like a syntax error to it. But it's not. This had always worked, and still does. So how can I tell the source processor to shut up about it? πŸ˜‰

      Thanks in advance,
      Frank

      www.frankwilleke.de
      Only asking personal code questions here.

      1 Reply Last reply Reply Quote 0
      • fwilleke80F
        fwilleke80
        last edited by fwilleke80

        I managed to get rid of the error by adding this line to projectdefinition.txt:

        DontUncrustify="blowfish.cpp"
        

        But since this disables all source processor activity on this file, as I understood it, I wonder if there is no "cleaner" way to suppress just this one false error.

        www.frankwilleke.de
        Only asking personal code questions here.

        1 Reply Last reply Reply Quote 0
        • r_giganteR
          r_gigante
          last edited by

          Hi Frank, thanks for reaching out us.

          With regard to the reported issue, which I suppose it's happening on your side, you can consider, rather than disabling uncrustifying, modifying your code as:

          CBlowFish::CBlowFish(const unsigned char* ucKey, unsigned int keysize, const SBlock& roChain
          #ifdef _APPLE_
           , bool backwardsCompatibility_
          #endif
          ) : m_oChain0(roChain), m_oChain(roChain)
          

          Looking forward to see if it works for you, give best.
          Riccardo

          1 Reply Last reply Reply Quote 1
          • fwilleke80F
            fwilleke80
            last edited by

            Hi Riccardo,

            thank you! I'll try that.
            Admittedly, it doesn't really improve code readability πŸ˜‰

            Best greetings,
            Frank

            www.frankwilleke.de
            Only asking personal code questions here.

            1 Reply Last reply Reply Quote 0
            • fwilleke80F
              fwilleke80
              last edited by

              It builds, and the source processor does not complain. Thank you!

              www.frankwilleke.de
              Only asking personal code questions here.

              1 Reply Last reply Reply Quote 0
              • First post
                Last post