THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 03/08/2011 at 01:28, xxxxxxxx wrote:
Cinema 4D Version: 12
Platform: Mac OSX ;
Language(s) : C++ ;
I am trying to compile the SDK example plugin using xcode 4 on Mac OS X. In the documentation it says "CINEMA 4D's application folder can't be modified anymore (with the exception of the plugins folder)." which means the _api_lib and sdk examples can't be compiled from within the applications folder.
I've copied them to a local directory and got the _api_lib to compile and build ok. However when I try and build the sdk I get the following error:
Line 1121 of c4d_symbols.h: Expected identifier before numeric constant
The code around the error:
IDC_OK = 1,
IDC_CANCEL = 2,
ICON_WINDOW = 9000,
I see that in c4d_gui.h that IDC_OK and IDC_CANCEL are #defined to 1 and 2. This is what I assume is causing the error (after running the preprocessor this reads 1 = 1, etc.
Am I doing something wrong?
Thanks for any assistance.
On 03/08/2011 at 06:26, xxxxxxxx wrote:
Did you copy the plugins/cinema4dsdk folder and resource folder? This could be Xcode 4 (R12 SDK does work with 3.0) or some other change in build settings when opening the xc 3 project in xc 4. That's a rather fundamental error - that is, you lost build cohesion.
On 04/08/2011 at 01:21, xxxxxxxx wrote:
Yes, I copied the resources. Several changes are needed for xcode 4 (not to mention moving the _api_lib directory to a different location).
If I come up with a solution, I'm happy to make the xcode 4 project available.
On 04/08/2011 at 01:55, xxxxxxxx wrote:
Definitely try to vary the project settings. There is nothing wrong with the SDK project but I have on occasion (many times, that is) had Xcode either balk when going from one version to another or actually change the project settings. Apple needs to stop fiddling with the settings stored with the project and read them verbatim instead. Might be that someone doesn't understand the notion of "if it ain't broke don't fix it". Fired 'im.
On 09/08/2011 at 22:20, xxxxxxxx wrote:
ok, I have solved my problem - in case anyone else has this problem, it is due to the header search path setting. There are lots of different files all with the same name "c4d_symbols.h" - you need to set the path to look in the res subdirectory of cinema4dsdk first when building the sample plugin.
However, now that I've got everything to compile, there is still another problem. When the linking stage is performed to build cinema4dsdk.dylib I get the following errors:
Undefined symbols for architecture x86_64:
"typeinfo for CTrackData", referenced from:
typeinfo for BlinkerTrackin blinker.o
"typeinfo for GeModalDialog", referenced from:
typeinfo for SmplMatrixDialogin filtermatrix.o
typeinfo for ThresholdDialogin filterthreshold.o
typeinfo for SerialDialogin serial.o
"typeinfo for CommandData", referenced from:
typeinfo for BitmapSaverTestin paint_saver_test.o
typeinfo for ActiveObjectDialogCommandin activeobject.o
typeinfo for AsyncTestin asynctest.o
typeinfo for LayerShaderBrowseCommandin layershaderbrowser.o
typeinfo for ListViewTestin listview.o
typeinfo for MemStatCommandin memstat.o
typeinfo for MenuTestin menutest.o
I assume this is because these symbols are defined within the host software application, when the plugin is loaded (i.e. they're not defined in lib_api_debug.a). So the question is, what else do I need to link with to resolve these symbols?