Can't create a .cdl file :-(



  • On 29/05/2015 at 15:45, xxxxxxxx wrote:

    User Information:
    Cinema 4D Version:   14 
    Platform:   Windows  ;   
    Language(s) :     C++  ;

    ---------
    I coded a plugin in Xcode (I always start on Mac OS).
    It is working fine.
    Then I took the project to Windows and compiled an x64 file (cdl64) in Visual Studio 11. But when I try to create a simple .cdl, the resulting code is not even loaded in R14.
    So, I decided to try to compile the .cdl file in Visual Studio 10 (I used to compile .cdl files there, with success).
    But now I'm getting all these errors:

    2>c:\program files (x86)\microsoft visual studio 10.0\vc\include\xlocale(323) : warning C4530: C++ exception handler used, but unwind semantics are not enabled. Specify /EHsc
    2>c:\program files\maxon\cinema 4d r14\plugins\polypaintfrommaterial\source\polypaintfrommaterial.cpp(188) : error C2065: 'BaseArray' : undeclared identifier
    2>c:\program files\maxon\cinema 4d r14\plugins\polypaintfrommaterial\source\polypaintfrommaterial.cpp(188) : error C2059: syntax error : '>'
    2>c:\program files\maxon\cinema 4d r14\plugins\polypaintfrommaterial\source\polypaintfrommaterial.cpp(189) : error C2065: 'BaseArray' : undeclared identifier
    2>c:\program files\maxon\cinema 4d r14\plugins\polypaintfrommaterial\source\polypaintfrommaterial.cpp(189) : error C2059: syntax error : '>'
    2>c:\program files\maxon\cinema 4d r14\plugins\polypaintfrommaterial\source\polypaintfrommaterial.cpp(194) : error C2065: 'textags' : undeclared identifier
    2>c:\program files\maxon\cinema 4d r14\plugins\polypaintfrommaterial\source\polypaintfrommaterial.cpp(194) : error C2228: left of '.Append' must have class/struct/union
    2>          type is ''unknown-type''
    2>c:\program files\maxon\cinema 4d r14\plugins\polypaintfrommaterial\source\polypaintfrommaterial.cpp(195) : error C2065: 'texuvws' : undeclared identifier
    2>c:\program files\maxon\cinema 4d r14\plugins\polypaintfrommaterial\source\polypaintfrommaterial.cpp(195) : error C2228: left of '.Append' must have class/struct/union
    2>          type is ''unknown-type''
    2>c:\program files\maxon\cinema 4d r14\plugins\polypaintfrommaterial\source\polypaintfrommaterial.cpp(203) : error C2065: 'textags' : undeclared identifier
    2>c:\program files\maxon\cinema 4d r14\plugins\polypaintfrommaterial\source\polypaintfrommaterial.cpp(203) : error C2228: left of '.GetCount' must have class/struct/union
    2>          type is ''unknown-type''
    2>c:\program files\maxon\cinema 4d r14\plugins\polypaintfrommaterial\source\polypaintfrommaterial.cpp(226) : error C2065: 'textags' : undeclared identifier
    2>c:\program files\maxon\cinema 4d r14\plugins\polypaintfrommaterial\source\polypaintfrommaterial.cpp(226) : error C2228: left of '.GetFirst' must have class/struct/union
    2>          type is ''unknown-type''
    2>c:\program files\maxon\cinema 4d r14\plugins\polypaintfrommaterial\source\polypaintfrommaterial.cpp(226) : error C2065: 'texuvws' : undeclared identifier
    2>c:\program files\maxon\cinema 4d r14\plugins\polypaintfrommaterial\source\polypaintfrommaterial.cpp(226) : error C2228: left of '.GetFirst' must have class/struct/union
    2>          type is ''unknown-type''
    2>c:\program files\maxon\cinema 4d r14\plugins\polypaintfrommaterial\source\polypaintfrommaterial.cpp(226) : error C2065: 'textags' : undeclared identifier
    2>c:\program files\maxon\cinema 4d r14\plugins\polypaintfrommaterial\source\polypaintfrommaterial.cpp(226) : error C2228: left of '.GetCount' must have class/struct/union
    2>          type is ''unknown-type''
    2>
    2>Build FAILED.
    2>
    2>Time Elapsed 00:00:02.58
    ========== Build: 1 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

    What could be wrong?



  • On 29/05/2015 at 16:01, xxxxxxxx wrote:

    Looks like the BaseArray definition is not being found.  Have you compared compiler Include Directories between your Xcode and VS projects?



  • On 29/05/2015 at 16:06, xxxxxxxx wrote:

    No... but, why is it compiling fine for .cdl64 and not for .cdl?



  • On 29/05/2015 at 16:25, xxxxxxxx wrote:

    So, you are only getting those errors in the 64-bit build attempt?  At least compare your 32-bit and 64-bit project settings in VS.  Could be something there.



  • On 29/05/2015 at 16:29, xxxxxxxx wrote:

    I'm only getting those errors in the 32-bit build attempt.
    The .cdl64 compiled fine (although, the plugin is not working correctly).

    [edit]
    Actually the plugin is working fine. I was just making a mistake ;-)
    However, I still can't compile it as a a.cdl file.



  • On 30/05/2015 at 16:03, xxxxxxxx wrote:

    I started over, duplicating the cinema4dsdk directory, replacing the res and source folders with my own and I still get all these errors:

    1>------ Build started: Project: cinema4dsdk, Configuration: Release Win32 ------
    1>Build started 5/31/2015 12:00:09 AM.
    1>Project file contains ToolsVersion="12.0". This toolset may be unknown or missing, in which case you may be able to resolve this by installing the appropriate version of MSBuild, or the build may have been forced to a particular ToolsVersion for policy reasons. Treating the project as if it had ToolsVersion="4.0". For more information, please see http://go.microsoft.com/fwlink/?LinkId=291333.
    1>Project file contains ToolsVersion="12.0". This toolset may be unknown or missing, in which case you may be able to resolve this by installing the appropriate version of MSBuild, or the build may have been forced to a particular ToolsVersion for policy reasons. Treating the project as if it had ToolsVersion="4.0". For more information, please see http://go.microsoft.com/fwlink/?LinkId=291333.
    1>InitializeBuildStatus:
    1> Touching "C:\Program Files\MAXON\CINEMA 4D R14\plugins\PolyPaintFromMaterial\obj\cinema4dsdk\Win32_Release\cinema4dsdk.unsuccessfulbuild".
    1>ClCompile:
    1> PolyPaintfromMaterial.cpp
    1>c:\program files (x86)\microsoft visual studio 10.0\vc\include\xlocale(323) : warning C4530: C++ exception handler used, but unwind semantics are not enabled. Specify /EHsc
    1>c:\program files\maxon\cinema 4d r14\plugins\polypaintfrommaterial\source\polypaintfrommaterial.cpp(188) : error C2653: 'maxon' : is not a class or namespace name
    1>c:\program files\maxon\cinema 4d r14\plugins\polypaintfrommaterial\source\polypaintfrommaterial.cpp(188) : error C2065: 'BaseArray' : undeclared identifier
    1>c:\program files\maxon\cinema 4d r14\plugins\polypaintfrommaterial\source\polypaintfrommaterial.cpp(188) : error C2059: syntax error : '>'
    1>c:\program files\maxon\cinema 4d r14\plugins\polypaintfrommaterial\source\polypaintfrommaterial.cpp(189) : error C2653: 'maxon' : is not a class or namespace name
    1>c:\program files\maxon\cinema 4d r14\plugins\polypaintfrommaterial\source\polypaintfrommaterial.cpp(189) : error C2065: 'BaseArray' : undeclared identifier
    1>c:\program files\maxon\cinema 4d r14\plugins\polypaintfrommaterial\source\polypaintfrommaterial.cpp(189) : error C2059: syntax error : '>'
    1>c:\program files\maxon\cinema 4d r14\plugins\polypaintfrommaterial\source\polypaintfrommaterial.cpp(194) : error C2065: 'textags' : undeclared identifier
    1>c:\program files\maxon\cinema 4d r14\plugins\polypaintfrommaterial\source\polypaintfrommaterial.cpp(194) : error C2228: left of '.Append' must have class/struct/union
    1>          type is ''unknown-type''
    1>c:\program files\maxon\cinema 4d r14\plugins\polypaintfrommaterial\source\polypaintfrommaterial.cpp(195) : error C2065: 'texuvws' : undeclared identifier
    1>c:\program files\maxon\cinema 4d r14\plugins\polypaintfrommaterial\source\polypaintfrommaterial.cpp(195) : error C2228: left of '.Append' must have class/struct/union
    1>          type is ''unknown-type''
    1>c:\program files\maxon\cinema 4d r14\plugins\polypaintfrommaterial\source\polypaintfrommaterial.cpp(203) : error C2065: 'textags' : undeclared identifier
    1>c:\program files\maxon\cinema 4d r14\plugins\polypaintfrommaterial\source\polypaintfrommaterial.cpp(203) : error C2228: left of '.GetCount' must have class/struct/union
    1>          type is ''unknown-type''
    1>c:\program files\maxon\cinema 4d r14\plugins\polypaintfrommaterial\source\polypaintfrommaterial.cpp(226) : error C2065: 'textags' : undeclared identifier
    1>c:\program files\maxon\cinema 4d r14\plugins\polypaintfrommaterial\source\polypaintfrommaterial.cpp(226) : error C2228: left of '.GetFirst' must have class/struct/union
    1>          type is ''unknown-type''
    1>c:\program files\maxon\cinema 4d r14\plugins\polypaintfrommaterial\source\polypaintfrommaterial.cpp(226) : error C2065: 'texuvws' : undeclared identifier
    1>c:\program files\maxon\cinema 4d r14\plugins\polypaintfrommaterial\source\polypaintfrommaterial.cpp(226) : error C2228: left of '.GetFirst' must have class/struct/union
    1>          type is ''unknown-type''
    1>c:\program files\maxon\cinema 4d r14\plugins\polypaintfrommaterial\source\polypaintfrommaterial.cpp(226) : error C2065: 'textags' : undeclared identifier
    1>c:\program files\maxon\cinema 4d r14\plugins\polypaintfrommaterial\source\polypaintfrommaterial.cpp(226) : error C2228: left of '.GetCount' must have class/struct/union
    1>          type is ''unknown-type''
    1>
    1>Build FAILED.
    1>
    1>Time Elapsed 00:00:01.84
    ========== Build: 0 succeeded, 1 failed, 1 up-to-date, 0 skipped ==========

    I guess that, if I can make it accept the maxon::BaseArray stuff, everything will be ok.
    Is there any include that I must do?!?



  • On 31/05/2015 at 09:34, xxxxxxxx wrote:

    How come creating a .cdl64 has no problems with:

    maxon::BaseArray<TextureTag*> textags;
    maxon::BaseArray<UVWTag*> texuvws;

    But trying to create a .cdl file has problems with these line?



  • On 01/06/2015 at 07:49, xxxxxxxx wrote:

    Hi Rui,

    I think, you need to start reading at the top. The project seems to have problems finding the toolset for the 32-Bit build. There may be several reasons. I don't know, if there's an option to install the 64-Bit version of the toolchain, only. I do remember with VS2010 Express, there you had to take care and and install some extra packages, in order to get 64-Bit + 32-Bit working in parallel (though I don't remember exactly, if the problems manifested on the 32-Bit or the 64-Bit side).
    The reason can be manifold, for example order of installation and updates. For example see here in MS Knowledgebase.

    Also please check, what the "Platform Toolset" (Project Properties, page General) is set to for the 32-Bit project.

    In order to help any further, we would need some detailed information on exact versions of installed VisualStudio's (also if pro or express) and related packages. But to be honest, I think, google will probably be a better friend, as these problems are usually not related to the C4D SDK.



  • On 02/06/2015 at 01:22, xxxxxxxx wrote:

    I was out all day yesterday and only now I read this.
    I will have to leave in a while and only get back later but I will investigate deeper taking all this information into account.
    Thank you, Andreas.

    p.s. What is strange is that I already compiled .cdl files in the past.



  • On 05/07/2015 at 09:20, xxxxxxxx wrote:

    I checked the Platform Toolset and the only options I have available are v100 and v90.
    I tried starting from scratch, duplicating the cinema4dsdk folder and replacing the res and source code with my own but I still get these errors:

    1>Time Elapsed 00:00:42.59
    2>------ Build started: Project: cinema4dsdk, Configuration: Release Win32 ------
    2>Build started 7/5/2015 5:18:10 PM.
    2>Project file contains ToolsVersion="12.0". This toolset may be unknown or missing, in which case you may be able to resolve this by installing the appropriate version of MSBuild, or the build may have been forced to a particular ToolsVersion for policy reasons. Treating the project as if it had ToolsVersion="4.0". For more information, please see http://go.microsoft.com/fwlink/?LinkId=291333.
    2>Project file contains ToolsVersion="12.0". This toolset may be unknown or missing, in which case you may be able to resolve this by installing the appropriate version of MSBuild, or the build may have been forced to a particular ToolsVersion for policy reasons. Treating the project as if it had ToolsVersion="4.0". For more information, please see http://go.microsoft.com/fwlink/?LinkId=291333.
    2>InitializeBuildStatus:
    2> Creating "C:\Program Files\MAXON\CINEMA 4D R14\plugins\PolyPaintFromMaterial2\obj\cinema4dsdk\Win32_Release\cinema4dsdk.unsuccessfulbuild" because "AlwaysCreate" was specified.
    2>MakeDirsForCl:
    2> Creating directory "C:\Program Files\MAXON\CINEMA 4D R14\plugins\PolyPaintFromMaterial2\obj\cinema4dsdk\Win32_Release\asm".
    2> Creating directory "C:\Program Files\MAXON\CINEMA 4D R14\plugins\PolyPaintFromMaterial2\obj\cinema4dsdk\Win32_Release\obj".
    2>ClCompile:
    2> c4d_helpers.cpp
    2> main.cpp
    2> PolyPaintfromMaterial.cpp
    2>c:\program files (x86)\microsoft visual studio 10.0\vc\include\xlocale(323) : warning C4530: C++ exception handler used, but unwind semantics are not enabled. Specify /EHsc
    2>c:\program files (x86)\microsoft visual studio 10.0\vc\include\xlocale(323) : warning C4530: C++ exception handler used, but unwind semantics are not enabled. Specify /EHsc
    2>c:\program files\maxon\cinema 4d r14\plugins\polypaintfrommaterial2\source\polypaintfrommaterial.cpp(188) : error C2653: 'maxon' : is not a class or namespace name
    2>c:\program files\maxon\cinema 4d r14\plugins\polypaintfrommaterial2\source\polypaintfrommaterial.cpp(188) : error C2065: 'BaseArray' : undeclared identifier
    2>c:\program files\maxon\cinema 4d r14\plugins\polypaintfrommaterial2\source\polypaintfrommaterial.cpp(188) : error C2059: syntax error : '>'
    2>c:\program files\maxon\cinema 4d r14\plugins\polypaintfrommaterial2\source\polypaintfrommaterial.cpp(189) : error C2653: 'maxon' : is not a class or namespace name
    2>c:\program files\maxon\cinema 4d r14\plugins\polypaintfrommaterial2\source\polypaintfrommaterial.cpp(189) : error C2065: 'BaseArray' : undeclared identifier
    2>c:\program files\maxon\cinema 4d r14\plugins\polypaintfrommaterial2\source\polypaintfrommaterial.cpp(189) : error C2059: syntax error : '>'
    2>c:\program files\maxon\cinema 4d r14\plugins\polypaintfrommaterial2\source\polypaintfrommaterial.cpp(194) : error C2065: 'textags' : undeclared identifier
    2>c:\program files\maxon\cinema 4d r14\plugins\polypaintfrommaterial2\source\polypaintfrommaterial.cpp(194) : error C2228: left of '.Append' must have class/struct/union
    2>          type is ''unknown-type''
    2>c:\program files\maxon\cinema 4d r14\plugins\polypaintfrommaterial2\source\polypaintfrommaterial.cpp(195) : error C2065: 'texuvws' : undeclared identifier
    2>c:\program files\maxon\cinema 4d r14\plugins\polypaintfrommaterial2\source\polypaintfrommaterial.cpp(195) : error C2228: left of '.Append' must have class/struct/union
    2>          type is ''unknown-type''
    2>c:\program files\maxon\cinema 4d r14\plugins\polypaintfrommaterial2\source\polypaintfrommaterial.cpp(203) : error C2065: 'textags' : undeclared identifier
    2>c:\program files\maxon\cinema 4d r14\plugins\polypaintfrommaterial2\source\polypaintfrommaterial.cpp(203) : error C2228: left of '.GetCount' must have class/struct/union
    2>          type is ''unknown-type''
    2>c:\program files\maxon\cinema 4d r14\plugins\polypaintfrommaterial2\source\polypaintfrommaterial.cpp(226) : error C2065: 'textags' : undeclared identifier
    2>c:\program files\maxon\cinema 4d r14\plugins\polypaintfrommaterial2\source\polypaintfrommaterial.cpp(226) : error C2228: left of '.GetFirst' must have class/struct/union
    2>          type is ''unknown-type''
    2>c:\program files\maxon\cinema 4d r14\plugins\polypaintfrommaterial2\source\polypaintfrommaterial.cpp(226) : error C2065: 'texuvws' : undeclared identifier
    2>c:\program files\maxon\cinema 4d r14\plugins\polypaintfrommaterial2\source\polypaintfrommaterial.cpp(226) : error C2228: left of '.GetFirst' must have class/struct/union
    2>          type is ''unknown-type''
    2>c:\program files\maxon\cinema 4d r14\plugins\polypaintfrommaterial2\source\polypaintfrommaterial.cpp(226) : error C2065: 'textags' : undeclared identifier
    2>c:\program files\maxon\cinema 4d r14\plugins\polypaintfrommaterial2\source\polypaintfrommaterial.cpp(226) : error C2228: left of '.GetCount' must have class/struct/union
    2>          type is ''unknown-type''
    2>
    2>Build FAILED.
    2>
    2>Time Elapsed 00:00:02.05
    ========== Build: 1 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========



  • On 05/07/2015 at 09:59, xxxxxxxx wrote:

    Ok, that was because I was using Visual Studio 2010 Express.
    Now, I tried using Visual Studio 2012 Express and starting each plugin from scratch (I mean, copying the cinema4dsdk and using my res and source folders from Xcode) and it seems to be working. At least, two out of six are already compiled in 32 and 64 bits :-)

    p.s. I had to add __LEGACY_API to each definition (32 and 64 bits)



  • On 05/07/2015 at 11:38, xxxxxxxx wrote:

    I still can't understand why you need 32-bit builds?  At R15, Cinema 4D is 64-bit *only* on all systems.  So, you are already trying to support a vanishingly small sliver of possible users of R14 in 32-bit.  Dump 32-bit builds altogether.  They won't be useful to 99.9% of the userbase.



  • On 05/07/2015 at 11:48, xxxxxxxx wrote:

    You are probably right. Well, not probably... you are right!!!
    But I still have some clients that are using R14 :-(



  • On 05/07/2015 at 13:15, xxxxxxxx wrote:

    Instead of banging your head on the 32-bit builds, find out how many clients are using R14 in 32-bit mode.  If it is warranted, then proceed.


Log in to reply