R12+VS2005+FBX2010=Error C4263?



  • THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

    On 29/01/2011 at 21:10, xxxxxxxx wrote:

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

    ---------
    Howdy,

    I've compiled my plugin with the FBXSDK2010 library for all version without any problems except for R12 PC version, where I get a ton of both errors C4263 and C4264. After googling those errors, I found this information:

    Compiler Warning (level 1) C4264
    Visual Studio 2005

    Error Message
    'virtual_function' : no override available for virtual member function from base 'class'; function is hidden

    C4264 is always generated after C4263.
    This warning is off by default. See Compiler Warnings That Are Off by Default for more information.

    ...which says that those warnings should be off by default.

    I also found out that those warnings can be turned on and off with the #pragma warning() preprocessor directive so, I added this line to my code:

    #if API_VERSION == 12000
    	#pragma warning(disable : 4263 4264)
    #endif
    

    With those turned off, it compiles and runs fine in R12 on PC, but is it safe to do that?

    Adios,
    Cactus Dan



  • THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

    On 30/01/2011 at 01:32, xxxxxxxx wrote:

    Originally posted by xxxxxxxx

    <ADDRESS>
    User Information:
    Cinema 4D Version:   R12 
    Platform:   Windows  ;   
    Language(s) :    
    C++  ;

    ---------
    </ADDRESS> Howdy,
    I've compiled my plugin with the FBXSDK2010 library for all version without any problems except for R12 PC version, where I get a ton of both errors C4263 and C4264. After googling those errors, I found this information:

    Compiler Warning (level 1) C4264
    Visual Studio 2005
    Error Message
    'virtual_function' : no override available for virtual member function from base 'class'; function is hidden
    C4264 is always generated after C4263.
    This warning is off by default. See Compiler Warnings That Are Off by Default for more information.

    ...which says that those warnings should be off by default.
    I also found out that those warnings can be turned on and off with the #pragma warning() preprocessor directive so, I added this line to my code:

    [/DIV][DIV][DIV]#if API_VERSION == 12000[/DIV][DIV]<span ="Apple-tab-span" style="white-space:pre">     </span>#pragma warning(disable : 4263 4264)[/DIV][DIV]#endif[/DIV][/DIV][DIV]
    

    With those turned off, it compiles and runs fine in R12 on PC, but is it safe to do that?
    Adios,
    Cactus Dan

    You should definitely check that and find out what tricks the compiler. We don't use this pragma (to disable the 4263 6264 warnings) in Cinema (or the FBX module) and we're compiling with maximum warning level (4) without getting that compiler message.

    Best regards,

    Wilfried



  • THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

    On 30/01/2011 at 07:31, xxxxxxxx wrote:

    Howdy,

    Well, where do I start checking? I'm really not as familiar with Visual Studio as I am with Xcode. 😊

    And the thing that is puzzling is that the plugin compiled fine for R9.6, R10, R10.5 and R11 on PC with VS2005. 
    My code is setup with a lot of version compatibility preprocessor directives like this:

    #if API_VERSION < 12000
    // pre r12 function call...
    #else
    // r12 function call...
    #endif
    

    ... so that I only develop code once in one version and can then compile all versions without making a lot of changes to the code. So, nothing has changed in my code between the versions. All of the errors in the R12 VS2005 compile point to the FBX SDK classes. 

    Edit:
    The errors only occur for compiling those .cpp files of my code that include the fbx headers.

    Adios,
    Cactus Dan



  • THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

    On 30/01/2011 at 08:48, xxxxxxxx wrote:

    Originally posted by xxxxxxxx

    Howdy,
    Well, where do I start checking? I'm really not as familiar with Visual Studio as I am with Xcode. 😊
    And the thing that is puzzling is that the plugin compiled fine for R9.6, R10, R10.5 and R11 on PC with VS2005. 
    My code is setup with a lot of version compatibility preprocessor directives like this:

    #if API_VERSION < 12000[/DIV][DIV]// pre r12 function call...[/DIV][DIV]#else[/DIV][DIV]// r12 function call...[/DIV][DIV]#endif[/DIV][DIV]
    

    ... so that I only develop code once in one version and can then compile all versions without making a lot of changes to the code. So, nothing has changed in my code between the versions. All of the errors in the R12 VS2005 compile point to the FBX SDK classes. 
    Edit:
    The errors only occur for compiling those .cpp files of my code that include the fbx headers.
    Adios,
    Cactus Dan

    You'll have to use many #if to include/exclude some of your code and find the culprit. E.g something like this:

    class theBaseClass {
        virtual void Yourfunc() const {
        }
    };

    class DerivedClass : theBaseClass {
        virtual void Yourfunc() {
        }
    };

    could have happened. For the derived class the compiler will create a warning (as the const is missing). As your code bascially seems to run, its likely just a small typo problem (as the compiler's "guessing" creates a working binary).

    I'd also advise you to turn on warning level 4 to get every additional info from the compiler...

    Best regards,

    Wilfried



  • THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

    On 30/01/2011 at 10:02, xxxxxxxx wrote:

    Howdy,

    Well, the only classes I'm deriving from are Cinema 4D's GeUserArea, GeModalDialog and CommandData, and the only virtual functions used are like this:

    class MyUserArea : public GeUserArea
    {
    public:
    	virtual void DrawMsg(LONG x1, LONG y1, LONG x2, LONG y2, const BaseContainer& msg);
    	virtual Bool GetMinSize(LONG& w, LONG& h);
    	virtual void Sized(LONG w, LONG h);
    };
      
    class MyDialog : public GeModalDialog
    {
    public:
    	virtual Bool CreateLayout(void);
    	virtual Bool InitValues(void);
    	virtual Bool Command(LONG id,const BaseContainer &msg);
    };
      
    class MyCommand : public CommandData
    {
    public:
    	virtual Bool Execute(BaseDocument *doc);
    };
    

    .. and those seem fine. Those same classes are used in my other plugins and they compile fine without those warnings.

    Also, the project is simply a copy of the cinema4dsdk project, with my source code substituted in for the cinema4dsdk source code and the fbx sdk library added along with the wininet.lib (which I assumed is needed by the fbx sdk). The warning level was already set to level 4 in the sdk project.

    Here is a text file showing all of the warnings and errors generated from the fbx sdk classes:
    http://www.cactus3d.com/PCErrors.zip

    Those same warnings and errors are repeated for three of my .cpp files, the file for the import command, the export command and a file with some common functions.

    I'm really kind of at a loss on where else to look. If I'm understanding the MSDN explanation right, those warnings should never have appeared because they're supposed to be off by default. 😠

    Maybe I should make a blank test R12 plugin and include the fbx sdk library and see if those errors still pop up. But for now, since it did compile and run, it's good enough to send to my beta testers while I try to figure out a solution. 😉

    Adios,
    Cactus Dan



  • THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

    On 30/01/2011 at 14:24, xxxxxxxx wrote:

    Howdy,

    Well, I created an empty project, that is simply a copy of the cinema4dsdk project with all the code stripped away so there is only a main.cpp file, added the fbx sdk library, compiled it and those same errors popped up.

    Here is the empty project:
    http://www.cactus3d.com/FBXSDK2010_Test_R12.zip

    At this point, I have absolutely no idea how to resolve the issue. 😠

    Adios,
    Cactus Dan



  • THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

    On 02/02/2011 at 14:46, xxxxxxxx wrote:

    Howdy,

    Has anyone tried compiling the empty project I posted above with the FBX SDK 2010.2 and been able to do it without getting those errors?

    Adios,
    Cactus Dan



  • THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

    On 03/02/2011 at 02:54, xxxxxxxx wrote:

    I tried to but I use VS2008 and the conversion process when loading the solution generated an error. Also it means getting hold of the FBX SDK, so that means registering with Autodesk, which I didn't get round to (well, TBH didn't want to give them all the personal info they ask for).

    I'll give it a go though if you think it would be helpful, bearing in mind the VS version I'm using.



  • THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

    On 03/02/2011 at 05:19, xxxxxxxx wrote:

    I will give it a try later today.

    cheers,
    Matthias



  • THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

    On 03/02/2011 at 07:02, xxxxxxxx wrote:

    I tried to compile your test project with R12 and I get the same warnings and errors as you described. Here they are C4263 and C4264 erros as well. I will see if I can find a solution.

    cheers,
    Matthias



  • THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

    On 03/02/2011 at 07:18, xxxxxxxx wrote:

    Howdy,

    Thanks Matthias. Maybe it is some compiler settings or something?

    The project is a copy of the cinema4dsdk project that came with the R12 Demo, I believe the version I downloaded was the first released demo. I haven't updated it, although, I don't know if the sdk project gets updated with it?

    Adios,
    Cactus Dan



  • THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

    On 03/02/2011 at 07:24, xxxxxxxx wrote:

    your server is unreachable so I cannot download it for a trail run but will try again later.



  • THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

    On 03/02/2011 at 07:38, xxxxxxxx wrote:

    Howdy,

    Yeah, my web hosting service is experiencing an outage. Ouch

    But here's what I did, if you want to try it from scratch: I simply made a copy of the cinema4dsdk project and deleted all of the files except the main.cpp file. Then in the main.cpp file, I deleted most of the code and added the include files for the fbx sdk like this:

    /////////////////////////////////////////////////////////////
    // CINEMA 4D SDK                                           //
    /////////////////////////////////////////////////////////////
    // (c) 1989-2004 MAXON Computer GmbH, all rights reserved  //
    /////////////////////////////////////////////////////////////
      
    // Starts the plugin registration
      
    #include "c4d.h"
    #include <string.h>
      
    // fbx sdk includes
    #include "fbxsdk.h"
    #include <fbxfilesdk/kfbxio/kfbxiosettings.h>
    #include <fbxfilesdk/fbxfilesdk_nsuse.h>
      
    Bool PluginStart(void)
    {
    	return TRUE;
    }
      
    void PluginEnd(void)
    {
    }
      
    Bool PluginMessage(LONG id, void *data)
    {
    	//use the following lines to set a plugin priority
    	//
    	switch (id)
    	{
    		case C4DPL_INIT_SYS:
    			if (!resource.Init()) return FALSE; // don't start plugin without resource
    			return TRUE;
      
    		case C4DMSG_PRIORITY: 
    			return TRUE;
      
    	}
      
    	return FALSE;
    }
    

    ... added the fbx static library for VS2005, and compiled.

    Edit:
    Also, I followed the instructions in the pdf file for "Installing and Configuring" for Windows.

    Adios,
    Cactus Dan



  • THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

    On 03/02/2011 at 08:17, xxxxxxxx wrote:

    hmm, I can only download the fbx 2011 sdk libraries from the autodesk website. I'll see if I get the same errors with that one.



  • THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

    On 03/02/2011 at 08:21, xxxxxxxx wrote:

    Howdy,

    There is a link on their site to older versions. You can actually download all versions back to 2005.

    Adios,
    Cactus Dan



  • THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

    On 06/02/2011 at 07:40, xxxxxxxx wrote:

    Howdy,

    Any solutions yet?

    Adios,
    Cactus Dan



  • THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

    On 07/02/2011 at 10:16, xxxxxxxx wrote:

    Well, I tried it now and the same happens with the 2011 library. Same warning and also C4264 is treated as error even. So this is a persistent issue I assume.



  • THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

    On 07/02/2011 at 10:25, xxxxxxxx wrote:

    Oh just to mention, I used your project that you provided.



  • THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

    On 07/02/2011 at 10:31, xxxxxxxx wrote:

    Howdy,

    The question is what is it in the R12 sdk project that is different from the R9, R10 and R11 sdk projects, because those compile fine with the fbx library on Windows?

    Is the built in fbx exporter compiled like a plugin, too? If I go to "resource/modules/fbx2010/" I see 2 files:
    fbx2010.cdl
    fbx2010.cdl64

    Adios,
    Cactus Dan



  • THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

    On 07/02/2011 at 10:32, xxxxxxxx wrote:

    Howdy,

    Originally posted by xxxxxxxx

    Oh just to mention, I used your project that you provided.

    If you start from scratch and strip out all the code from a copy of the sdk project as I did, do you get the same errors?

    Adios,
    Cactus Dan


Log in to reply