Can't compile cinema4dsdk :-(
-
On 03/06/2014 at 03:24, xxxxxxxx wrote:
User Information:
Cinema 4D Version:Â Â Â 14Â
Platform:Â Â Â Â Â Mac OSXÂ ;Â
Language(s) :Â Â Â Â C++Â ;---------
I duplicated the cinema4dsdk folder inside my R14 plugins folder. This is a R14 that I use only for developing plugins and scripts.
I then renamed the folder to the name of the plugin I want to create (is a shader) and double clicked the cinema4dsdk.xcodeproj file.
Xcode opened (I'm using Xcode 5.1) and when I choose Build, it told me that the build failed.
I got this error:Apple LLVM 5.0 Error
Command /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang failed with exit code 1What am I doing wrong?
-
On 03/06/2014 at 08:57, xxxxxxxx wrote:
Damn! I can't do anything of this C++ stuff.
All I get is errors and "Build Failed"
Not even using André Berg's frameworks created with CINEMA_4D_Plugin_Wizard.
Is it always so complicated to start coding anything in C++? -
On 03/06/2014 at 09:19, xxxxxxxx wrote:
Is that all the information you get?
Not something specific about files missing, etc.?Could you compile the original sdk?
So, copy and do a "clean" compile.It toke me also some time to get it up and running on a Mac.
PC is easier / more friendly.I'm still using 4.2.
-
On 03/06/2014 at 09:21, xxxxxxxx wrote:
Yes....Your first steps will be the hardest.
After you figure out how to compile the SDK and create a simple plugin. It gets easier from there.
Which is why I created a video tutorial on how to make the jump from Coffee to C++ years ago.Unfortunately, I'm not a mac user. So I can't help you.
But there's a mac tutorial here: http://c4dprogramming.wordpress.com/2012/10/02/creating-a-new-plugin-project-in-xcode/Have you looked at that one Rui?
-ScottA
-
On 03/06/2014 at 09:35, xxxxxxxx wrote:
Thank you both.
I didn't had seen this tutorial. I will watch it right after going pick my daughter at school.
Damn, using python is so much simpler -
On 03/06/2014 at 10:29, xxxxxxxx wrote:
No it's not.
Well...yes it is...But no it's not.What I'm trying to say is this:
C++ is only hard if you make hard. Not quite as simple as Python. But nowhere near as complicated as people make it out to be.
Remember how hard it was for you to switch from Coffee to Python?
Switching from Coffee/Python to C++ should be roughly the same amount of struggle.
A loop is a loop, and a variable is a variable, etc.. Regardless of how it's written.
In the beginning you just have to use the code other people have written and type it a few hundred times. Until your brain accepts it as normal.
There's a "burn-in" time period that you have to allow your brain to go through when switching to any new language.The first time you typed something simple like "doc.GetActiveObject()" it was probably fairly strange and uncomfortable. But by the hundredth time. You don't even think about it anymore.
That's how C++ works too. Once you type the code enough times you won't even think about it anymore. And it will be just as easy to write as Coffee and Python is for you now.
You just have to give yourself the typing time. And not try to rush it.-ScottA
-
On 03/06/2014 at 10:45, xxxxxxxx wrote:
I know what you mean, Scott.
When I started programming, almost 30 years ago, I started out with BASIC. It was quite simple.
Then I started coding in assembler. It was waaaaay more complex but after an year I was coding it almost as easily as I did with BASIC.
Then I started learning C. It was complex at first but then it became simpler.
Going from C to COFFEE was very, very simple.
And going from COFFEE to python was a little strange at first but now I love python more and more each day (still learning it).
I know going from python and COFFEE to C++ will be a little daunting at first, but I also know that some stuff can only be made with C++ (I hope python gets some updates!!! )
Coding in python is so much faster and simple. Typeless variables, not having to worry with casting all functions, not having to deal with all the pointers, etc.
Also, with python I just have to type the code and run Cinema4D and it is ready for testing (with COFFEE I can even run "Reload COFFEE plugins" and I don't even have to leave and restart Cinema 4D).
Having to deal with a complex API, having to compile (and waaaaaait for it to end compiling) each time I make the slightest modification is a pain.
But... well... I guess I just have to bite the bulletAnyway, I followed the tutorial and I still get the error
This is what I get:CompileC /Applications/(build)/_api.build/Debug/_api.build/Objects-normal/x86_64/c4d_filterplugin.o /Applications/Maxon/Cinema4D\ 14\ -\ DEV/resource/_api/c4d_filterplugin.cpp normal x86_64 c++ com.apple.compilers.llvm.clang.1_0.compiler
    cd "/Applications/Maxon/Cinema4D 14 - DEV/resource/_api_lib"
    export LANG=en_US.US-ASCII
    /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -x c++ -arch x86_64 -fmessage-length=0 -fdiagnostics-show-note-include-stack -fmacro-backtrace-limit=0 -Wno-trigraphs -fno-exceptions -fno-rtti -fpascal-strings -O0 -Wno-missing-field-initializers -Wno-missing-prototypes -Wno-non-virtual-dtor -Wno-overloaded-virtual -Wno-exit-time-destructors -Wmissing-braces -Wparentheses -Wno-switch -Wunused-function -Wunused-label -Wno-unused-parameter -Wunused-variable -Wunused-value -Wempty-body -Wuninitialized -Wunknown-pragmas -Wno-shadow -Wno-four-char-constants -Wno-conversion -Wconstant-conversion -Wint-conversion -Wbool-conversion -Wenum-conversion -Wshorten-64-to-32 -Wno-newline-eof -Wno-c++11-extensions -DC4D_COCOA -DMAC_OS_X_VERSION_MIN_REQUIRED=1060 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk -fasm-blocks -fstrict-aliasing -Wdeprecated-declarations -Wno-invalid-offsetof -mmacosx-version-min=10.6 -g -msse3 -fvisibility=hidden -fvisibility-inlines-hidden -Wno-sign-conversion -I/Applications/(build)/_api.build/Debug/_api.build/_api_debug.hmap -I../../resource/_api -I../../resource/_api/c4d_customgui -I../../resource/_api/c4d_gv -I../../resource/_api/c4d_libs -I../../resource/_api/c4d_misc -I../../resource/_api/c4d_preview -I../../resource/_api/c4d_scaling -I../../resource/_api/c4d_misc/datastructures -I../../resource/_api/c4d_misc/docs -I../../resource/_api/c4d_misc/memory -I../../resource/_api/c4d_misc/docs/references -I../../resource/res -I../../resource/res/description -I../../resource/res/dialogs -I../../resource/res/menus -I../../resource/res/menus_bench -I../../resource/res/menus_lic -I../../resource/res/menus_net -I/Applications/(build)/Debug/include -I/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include -I/Applications/(build)/_api.build/Debug/_api.build/DerivedSources/x86_64 -I/Applications/(build)/_api.build/Debug/_api.build/DerivedSources -Wno-logical-op-parentheses -F/Applications/(build)/Debug -funsafe-math-optimizations -ffinite-math-only -fno-signaling-nans -fno-rounding-math -fcx-limited-range -ftrapping-math -include /Applications/Maxon/Cinema4D\ 14\ -\ DEV/resource/_api_lib/../../resource/_api/ge_mac_debug_flags.h -MMD -MT dependencies -MF /Applications/(build)/_api.build/Debug/_api.build/Objects-normal/x86_64/c4d_filterplugin.d --serialize-diagnostics /Applications/(build)/_api.build/Debug/_api.build/Objects-normal/x86_64/c4d_filterplugin.dia -c /Applications/Maxon/Cinema4D\ 14\ -\ DEV/resource/_api/c4d_filterplugin.cpp -o /Applications/(build)/_api.build/Debug/_api.build/Objects-normal/x86_64/c4d_filterplugin.oclang: error: unknown argument: '-fcx-limited-range' [-Wunused-command-line-argument-hard-error-in-future]
clang: note: this will be a hard error (cannot be downgraded to a warning) in the future
Command /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang failed with exit code 1I even re-installed Xcode and I still get this error when I choose Build.
-
On 03/06/2014 at 13:02, xxxxxxxx wrote:
Well may be it is more Xcode problem as C++?
As I can see for the last message you will need to remove '-fcx-limited-range'.
But probably this is not the source of the problems... -
On 03/06/2014 at 14:12, xxxxxxxx wrote:
I had to downgrade Xcode to version 4.6.3 and also update my project to use a built-in SDK ("Latest OS X")
Ok, let me start on this adventure.
-
On 03/06/2014 at 14:53, xxxxxxxx wrote:
I had to downgrade Xcode to version 4.6.3
By the way you may have multiple Xcode version at once.
You may have 5 and 4.6 at the same time. -
On 03/06/2014 at 16:04, xxxxxxxx wrote:
I have them both here
-
On 04/06/2014 at 05:48, xxxxxxxx wrote:
It helped me looking and trying to understand all (well most of them) xcode settings.
It also gave me some understanding about xcode and compiling / linking c++ (e.g. difference between a library and a program, etc.).
But again, start with the standard sdk (of course make a copy first) and then a simple plugin.Or even perhaps start with a simple "Hello World" program.
-
On 04/06/2014 at 06:15, xxxxxxxx wrote:
It has been a matter of trial and error (some stuff is not quite well explained in the SDK documentation)
But, the good news are that I already finished my very first C++ shader!!!
YES!!!