Moving Xcode project /Compile error xcode [SOLVED]



  • On 17/10/2014 at 02:40, xxxxxxxx wrote:

    User Information:
    Cinema 4D Version:   R16 
    Platform:      Mac OSX  ; 
    Language(s) :     C++  ;

    ---------
    Hi,

    for mac users now...
    OK, I got the directory issues solved so that I was able to move the SDK project folder, and everything compiled except for three errors:
    first

      
    /Applications/MAXON/CINEMA 4D R16/frameworks/cinema.framework/source/c4d_shader.h:167:11: No viable overloaded '='  
      
    it points to  
    InitRenderStruct()  
    {  
    docpath = nullptr;  
    

    second/third

      
    /Applications/MAXON/CINEMA 4D R16/frameworks/cinema.framework/source/c4d_misc/utilities/compilerdetection.h  
      
    it points to   
      // try the GCC extension typeof  
      #define decltype typeof  
    #endif  
    

    and

      
    #ifndef _HAS_STATIC_ASSERT  
      #define static_assert(cond, str)                                                        // dummy for old compiler  
    #endif  
      
    

    Has anyone an answer for this?
    Thanks in advance!
    Martin



  • On 17/10/2014 at 05:13, xxxxxxxx wrote:

    Originally posted by xxxxxxxx

    <ADDRESS>
    User Information:
    Cinema 4D Version:   R16 
    Platform:     
    Mac OSX  ; 
    Language(s) :    
    C++  ;

    ---------
    </ADDRESS> Hi,for mac users now...OK, I got the directory issues solved so that I was able to move the SDK
    project folder, and everything compiled except for three errors:first

    /Applications/MAXON/CINEMA 4D R16/frameworks/cinema.framework/source/c4d_shader.h:167:11: No viable overloaded '='it points toInitRenderStruct(){docpath = nullptr;
    

    second/third

    /Applications/MAXON/CINEMA 4D R16/frameworks/cinema.framework/source/c4d_misc/utilities/compilerdetection.hit points to     // try the GCC extension typeof    #define decltype typeof#endif
    

    and

    #ifndef _HAS_STATIC_ASSERT    #define static_assert(cond, str)                                                        // dummy for old compiler#endif
    

    Has anyone an answer for this?Thanks in advance!Martin

    R16 supports XCode 5.0.x or newer. Older versions might or might not fail depending on their C++11 support. Make sure you DON'T select older GCC or GCC-LLVM compiler in your project. They don't have sufficient language support for newer C++ features.

    Best regards,

    Wilfried



  • On 18/10/2014 at 03:12, xxxxxxxx wrote:

    Hi Wilfried,

    thanks for the reply!

    I´m using xcode 5.1.1 and since I´ve changed c++ language dialect settings  the compiler errors are gone.
    But yeay, the next errors pops up.

    semantic issues with enumeration values
    and a lot Apple Mach-O Linker (id)Errors.

    I´ve to say that I´m absolutly new to c++ and ide´s , just scripted Python with sublime before.

    Is there a way to get a short step by step intro for xcode to manage it
    like:
    https://plugincafe.maxon.net/topic/8153/10624_sdk-documentation

    there are a bunch of tutorials out there to get started with c++.
    But most of them rely on cleaning up the sdk structure until you´re close to what you need.
    But I don´t want my plugin in the example subfolder...

    Thanks in advance
    Martin



  • On 18/10/2014 at 18:31, xxxxxxxx wrote:

    Hi,

    for xcode 5.1.1 to move your sdk back to the plugin folder:

    1. copy and paste your cinema4dsdk folder to your plugin directory.
    2. inside the folder open cinema4dsdk.xcodeproj
    3.in Xcode go to the configurations folder of the project and delete the debugbase.xcconfig and the   
      releasebase.xcconfig file.
    4.you´ll be asked to unlock accept this.
    5.right click on the configurations folder and choose Add files to "cinema4dsdk"
      at MAXON/CINEMA 4D R16/frameworks/settings you´ll find the debugbase.xcconfig and the 
      releasebase.xcconfig files select them both and make sure that the checkbox for Destination is off
      and the checkbox at folders is set to "Create groups for any added folders". Click Add
    6. Select your project file and on the main window clik info.
      In the Configurations dropdown there is a Debug and a Release Dropdown.
      Choose debugbase and releasebase accordingly, but only for the "blue icons".
      You´ll see 1 Configuration Set now at the dropdowns.
    7.In your project structure on the left side, go to the libs folder and delete the cinema. 
      framework.xcodeproj file.
    8.right click on the libs folder and choose Add files to "cinema4dsdk"
      at MAXON/CINEMA 4D R16/frameworks/cinema.framework/project you´ll find the 
      cinema.framework.xcodeproj file again, Click Add.
    9.If you click on the frameworkproject file inside xcode indexing will process, wait until it is finished.
    10. In the main window go to Build Settings Choose Basic and Combined, under the User-Defined
      Settings you will find a MAXON_ROOTDIR. Change the path to ../../
    11. Change your window from Basis to All and search for the Linking Dropdown.
      At Mach-O Type choose Static Library.
     
    Now your´re good to go, build it and everything should work fine.

    Cheers
    Martin



  • On 19/10/2014 at 08:31, xxxxxxxx wrote:

    Hi Martin,

    I tried it and compiling is ok, the dylib is created.
    Except I do not see the plugins within cinema?
    I am using xcode 5.02.

    Edit: after changing the old way also did not work.
    Something screwed up the framework folder?



  • On 19/10/2014 at 09:36, xxxxxxxx wrote:

    Hi Pim,

    I did it with a clean installation of the framework and the examples folder.
    Nothing should be build before from the examples folder.
    Than I did the steps, described above.
    You also should clean up your xcode folder:
    Library/Developer/Xcode/DerivedData

    Check your read and write permissions, too.

    Hope it works for you

    Best wishes
    Martin



  • On 21/10/2014 at 14:51, xxxxxxxx wrote:

    Unfortunatly, this issue is not solved at the moment!

    After a skype session with Pim, we figured out that the sdk is building without any issues, great so far.
    But the example plugins did not show up at C4d, if the dylib has not been built with the example folder already.

    Is there any explanation for this.
    Has anyone moved the sdk folder successfully?

    Thanks for any help!
    Martin



  • On 22/10/2014 at 13:58, xxxxxxxx wrote:

    Hi Martin,

    Thanks for testing this out and keeping me posted.  Xcode project setup is way over my head, so I have nothing intelligent to add.

    Thank you,

    Joe Buck



  • On 03/11/2014 at 11:25, xxxxxxxx wrote:

    Any updates on this issue.
    A tutorial from the supports guys?

    The "new sdk location" for PC is solved, but now for the mac?

    -Pim



  • On 03/11/2014 at 12:30, xxxxxxxx wrote:

    Hi Pim,
    actually I'm working on a tutorial regarding project setup and moving projects around. I will need some time though. It's not the only project, I'm working on, and I would like to cover windows as well. Coming from a windows world, I also need to learn a few Xcode things. I'm sorry, I have no solution yet, but I'm working it. I'll keep you updated.



  • On 04/11/2014 at 01:06, xxxxxxxx wrote:

    Thanks for the update.
    In the mean time I will stick to the new sdk location.
    -Pim



  • On 04/11/2014 at 01:07, xxxxxxxx wrote:

    Thanks for your patience :)



  • On 06/11/2014 at 07:42, xxxxxxxx wrote:

    At this moment I am compiling and linking in R15 and then copy the plugin to R16.
    I guess when I am not using any R16 specifics, this will work.
    Perhaps a workaround people can use.



  • On 19/11/2014 at 00:35, xxxxxxxx wrote:

    stuck at the same point - there is now a solution?



  • On 19/11/2014 at 00:43, xxxxxxxx wrote:

    Hi,
    while I'm working on recipes (I admit, there are some pitfalls), I got news from our development. With Cinema 4D R16 SP2 the structure will be reverted to the old style.
    Before you ask, I can NOT tell, when R16 SP2 will be out (and I won't answer any questions regarding the release). Nor will I discuss, why this had to be changed and is now reverted. Sometimes life has it's surprises, learn to appreciate them... 😉
    Yet, I figured, I should let you know, as this may make it easier for you to stay patient and work with the current structure for a while.



  • On 26/11/2014 at 06:26, xxxxxxxx wrote:

    Pim,
    can you please try the following procedure to move your project. I started with monkeytack's recipe (thanks for that) and added steps where needed. Step 11 in there is definitely not recommended. So here's what I came up with:

    BEFORE moving anything, if you ever had opened the project you want to move in Xcode, open the project again and select Product -> Clean from menu (Shift+Cmd+K). Then close the project again.

    Now, make sure you have no other instances of Xcode open, in which you are working on a plugin project.

    Before continuing, I recommend a backup copy of the project to be moved (I'll use cinema4dsdk as example in the following). This backup should be outside the Cinema 4D tree (or at least outside the plugins folder).

    1. Move your cinema4dsdk folder to your plugin directory (one level up).

    2. Inside the folder open cinema4dsdk.xcodeproj

    3. In Xcode go to the configurations folder of the project and delete the debugbase.xcconfig and 
    the releasebase.xcconfig file

    4. You may be asked to unlock, accept this.

    5. Right click on the configurations folder and choose Add files to "cinema4dsdk"...
    In MAXON/CINEMA 4D R16/frameworks/settings you´ll find the debugbase.xcconfig and the releasebase.xcconfig files, select them both and make sure that the checkbox for Destination is off and the checkbox at folders is set to "Create groups for any added folders" (in Xcode 6 this is "Added folders: Create groups"). Click Add.

    6. Select your project file and on the main window click info.
    In the Configurations dropdown there is a Debug and a Release Dropdown.
    Choose debugbase and releasebase accordingly, but only for the "blue icons".
    You´ll see 1 Configuration Set now at the drop downs.

    7. In your project structure on the left side, go to the libs folder and delete the cinema.framework.xcodeproj file.

    8. Right click on the libs folder and choose Add files to "cinema4dsdk"...
    In MAXON/CINEMA 4D R16/frameworks/cinema.framework/project you´ll find the cinema.framework.xcodeproj file, Click Add.

    9. If you click on the frameworkproject file inside xcode indexing will process, wait until it is finished (Xcode 6 will do so without further ado).

    10. In the main window go to Build Settings Choose Basic and Combined, under the User-Defined Settings you will find a MAXON_ROOTDIR. Change the path to ../../ (if you moved the project one directory level up)

    11. Select the cinema4dsdk in the tree on the left (topmost, blue icon). Under Build Settings make sure to select the "Target" cinema4dsdk. Go into Build Phases. In "Link Binary With Libraries" click the + and select lib cinema.framework.a
    This step is vital, otherwise your plugin will not be correctly linked against the framework and the link step will fail.

    Because monkeytack suggested it in his step 11, please do NOT change the Mach-O Type to static library. This is not desirable and will lead to wrong results!

    12. Perhaps an Xcode guru can help me out here. But on my system with Xcode 6 there are several (build) directories created, while going through the above procedure. I really like to know, how this can be prevented. Anyway, BEFORE continuing these need to be deleted. Please be careful with delete operations and check the contents of the proposed folders. Perhaps you have stored valuable data in there.... The following locations need to be checked. In the MAXON directory next to the CINEMA 4D R16 folder, if there's a (build) folder, delete it. In CINEMA 4D R16 directory go into the (build) folder, if it exists and delete cinema4dsdk.build in there. Then in plugins if there's a (build) folder, check its contents and delete cinema4dsdk in there, or the entire folder. Finally in plugins/cinema4dsdk delete any cinema4dsdk.dylib and if there's a build and/or (build) subdir delete theses as well.

    Now you should be good to go.

    13. Build the cinema4dsdk examples and start up Cinema 4D.

    Perhaps a last note. I did this with Xcode 6.0.1. I'm pretty sure it will work the same in Xcode 5.1.1. I read somewhere, that Xcode 5.0.2 would not run properly on Yosemite, so I could not test this.



  • On 26/11/2014 at 07:26, xxxxxxxx wrote:

    Hello Andreas,

    thank you for that!
    It works for me.

    I see, the main issue was setting the target to the framework and leave it as a dynamic library, great.

    To avoid the temporary build folders all over the place, you can simply go to
    file->project settings->build and choose a derived data location.
    Usually they are stored at:    Library/Developer/Xcode/DerivedData
    Under advanced you can specify where the temporary folders should be built.

    Best wishes
    Martin



  • On 28/11/2014 at 04:53, xxxxxxxx wrote:

    Great it works.
    Martin and Andreas, thanks for the support.


Log in to reply