Maxon Developers Maxon Developers
    • Documentation
      • Cinema 4D Python API
      • Cinema 4D C++ API
      • Cineware API
      • ZBrush GoZ API
      • Code Examples on Github
    • Forum
    • Downloads
    • Support
      • Support Procedures
      • Registered Developer Program
      • Plugin IDs
      • Contact Us
    • Unread
    • Recent
    • Tags
    • Users
    • Login

    Source processor bug

    Cinema 4D SDK
    3
    3
    1.0k
    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.
    • R
      rootbender
      last edited by a_block

      I think the Source processor is buggy. It's checking code that is commented out with #if 0 blocks, which should be ignored.

      1> Source processor:
      1>test.cpp(463,89): error : No matching closing parenthesis found for {
      1>test.cpp(504,25): error : Mismatching closing parenthesis )

      Source code:
      #if 0
      printf"test"); // missing first parenthesis
      #endif

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

        Ah, I've had a similar problem. Thankfully, it turned out to be easily fixable:

        The source processor does not follow #if statements. All code is parsed, regardless of wether it would actually be compiled or not. Therefore the following code:

        #if API_VERSION >= 20000
        if (result->_descId[0].id == SOMETHING) {
        #else
        if (result->id[0].id == SOMETHING) {
        #endif
            DoSomething();
        }
        

        would look like this for the source processor:

        if (result->_descId[0].id == SOMETHING) {
        if (result->id[0].id == SOMETHING) {
            DoSomething();
        }
        

        Change it to something like this:

        #if API_VERSION >= 20000
        if (result->_descId[0].id == SOMETHING)
        #else
        if (result->id[0].id == SOMETHING)
        #endif
        {
            DoSomething();
        }
        

        Hope it helps.

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

        1 Reply Last reply Reply Quote 0
        • a_blockA
          a_block
          last edited by

          Hi,

          actually this is not a bug, but a design decision. Here at MAXON we have a pretty large code base and especially disabled code branches tend to age a lot faster. So we try to force developers to also maintain such code pieces or to at least think about, if they are still valuable and otherwise remove and thus cleanup the code base.

          Cheers,
          Andreas

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