Maxon Developers Maxon Developers
    • Documentation
      • Cinema 4D Python API
      • Cinema 4D C++ API
      • Cineware API
      • ZBrush GoZ API
      • Code Examples on Github
    • Forum
    • Downloads
    • Support
      • Support Procedures
      • Registered Developer Program
      • Plugin IDs
      • Contact Us
    • Categories
      • Overview
      • News & Information
      • Cinema 4D SDK Support
      • Cineware SDK Support
      • ZBrush 4D SDK Support
      • Bugs
      • General Talk
    • Unread
    • Recent
    • Tags
    • Users
    • Login

    Unresolved symbols with /GL /LTCG

    Cinema 4D SDK
    r20 c++ windows
    2
    4
    1.1k
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • rsodreR
      rsodre
      last edited by rsodre

      Hi,

      I wrote my first function using maxon::Result, works really well in Debug mode, but when I compile for Windows Release mode with /GL (implying /LTCG), I get some undefined symbols. If i disable /GL, it links successfully.

      [05:55:44][Link] SdkExample.obj error LNK2001: unresolved external symbol "public: struct maxon::ErrorInterface::MTable const & __cdecl maxon::Object::PrivateSuperMTable::GetMTable<class maxon::ErrorInterface>(void)const " (??$GetMTable@VErrorInterface@maxon@@@PrivateSuperMTable@Object@maxon@@QEBAAEBUMTable@ErrorInterface@2@XZ)
      [05:55:44][Link] SdkExample.obj error LNK2001: unresolved external symbol "public: class maxon::ComponentInfo const & __cdecl maxon::Object::GetComponentInfoOfSuper<class maxon::ErrorInterface::ReferenceFunctionsImpl<class maxon::Object::ReferenceFunctionsImpl<class maxon::RefBaseFunctions<class maxon::DirectRef<class maxon::UnexpectedErrorInterface,class maxon::PointerHandler,void> > > > >(class maxon::ErrorInterface::ReferenceFunctionsImpl<class maxon::Object::ReferenceFunctionsImpl<class maxon::RefBaseFunctions<class maxon::DirectRef<class maxon::UnexpectedErrorInterface,class maxon::PointerHandler,void> > > > const *,class maxon::PrivateOverloadRank0 *)const " (??$GetComponentInfoOfSuper@V?$ReferenceFunctionsImpl@V?$ReferenceFunctionsImpl@V?$RefBaseFunctions@V?$DirectRef@VUnexpectedErrorInterface@maxon@@VPointerHandler@2@X@maxon@@@maxon@@@Object@maxon@@@ErrorInterface@maxon@@@Object@maxon@@QEBAAEBVComponentInfo@1@PEBV?$ReferenceFunctionsImpl@V?$ReferenceFunctionsImpl@V?$RefBaseFunctions@V?$DirectRef@VUnexpectedErrorInterface@maxon@@VPointerHandler@2@X@maxon@@@maxon@@@Object@maxon@@@ErrorInterface@1@PEAVPrivateOverloadRank0@1@@Z)
      [05:55:44][Link] SdkExample.obj error LNK2001: unresolved external symbol "public: class maxon::ComponentInfo const & __cdecl maxon::Object::GetComponentInfoOfSuper<class maxon::ErrorInterface::ReferenceFunctionsImpl<class maxon::Object::ReferenceFunctionsImpl<class maxon::RefBaseFunctions<class maxon::DirectRef<class maxon::NullptrErrorInterface,class maxon::PointerHandler,void> > > > >(class maxon::ErrorInterface::ReferenceFunctionsImpl<class maxon::Object::ReferenceFunctionsImpl<class maxon::RefBaseFunctions<class maxon::DirectRef<class maxon::NullptrErrorInterface,class maxon::PointerHandler,void> > > > const *,class maxon::PrivateOverloadRank0 *)const " (??$GetComponentInfoOfSuper@V?$ReferenceFunctionsImpl@V?$ReferenceFunctionsImpl@V?$RefBaseFunctions@V?$DirectRef@VNullptrErrorInterface@maxon@@VPointerHandler@2@X@maxon@@@maxon@@@Object@maxon@@@ErrorInterface@maxon@@@Object@maxon@@QEBAAEBVComponentInfo@1@PEBV?$ReferenceFunctionsImpl@V?$ReferenceFunctionsImpl@V?$RefBaseFunctions@V?$DirectRef@VNullptrErrorInterface@maxon@@VPointerHandler@2@X@maxon@@@maxon@@@Object@maxon@@@ErrorInterface@1@PEAVPrivateOverloadRank0@1@@Z)
      [05:55:44][Link] SdkExample.obj error LNK2001: unresolved external symbol "public: class maxon::ComponentInfo const & __cdecl maxon::Object::GetComponentInfoOfSuper<class maxon::ErrorInterface::ReferenceFunctionsImpl<class maxon::Object::ReferenceFunctionsImpl<class maxon::RefBaseFunctions<class maxon::DirectRef<class maxon::UnsupportedArgumentErrorInterface,class maxon::PointerHandler,void> > > > >(class maxon::ErrorInterface::ReferenceFunctionsImpl<class maxon::Object::ReferenceFunctionsImpl<class maxon::RefBaseFunctions<class maxon::DirectRef<class maxon::UnsupportedArgumentErrorInterface,class maxon::PointerHandler,void> > > > const *,class maxon::PrivateOverloadRank0 *)const " (??$GetComponentInfoOfSuper@V?$ReferenceFunctionsImpl@V?$ReferenceFunctionsImpl@V?$RefBaseFunctions@V?$DirectRef@VUnsupportedArgumentErrorInterface@maxon@@VPointerHandler@2@X@maxon@@@maxon@@@Object@maxon@@@ErrorInterface@maxon@@@Object@maxon@@QEBAAEBVComponentInfo@1@PEBV?$ReferenceFunctionsImpl@V?$ReferenceFunctionsImpl@V?$RefBaseFunctions@V?$DirectRef@VUnsupportedArgumentErrorInterface@maxon@@VPointerHandler@2@X@maxon@@@maxon@@@Object@maxon@@@ErrorInterface@1@PEAVPrivateOverloadRank0@1@@Z)
      [05:55:44][Link] SdkExample.obj error LNK2001: unresolved external symbol "public: class maxon::ComponentInfo const & __cdecl maxon::Object::GetComponentInfoOfSuper<class maxon::ErrorInterface::ConstReferenceFunctionsImpl<class maxon::Object::COWReferenceFunctionsImpl<class maxon::RefBaseFunctions<class maxon::DirectRef<class maxon::ErrorInterface const ,class maxon::StrongCOWRefHandler,class maxon::Error> > > > >(class maxon::ErrorInterface::ConstReferenceFunctionsImpl<class maxon::Object::COWReferenceFunctionsImpl<class maxon::RefBaseFunctions<class maxon::DirectRef<class maxon::ErrorInterface const ,class maxon::StrongCOWRefHandler,class maxon::Error> > > > const *,class maxon::PrivateOverloadRank0 *)const " (??$GetComponentInfoOfSuper@V?$ConstReferenceFunctionsImpl@V?$COWReferenceFunctionsImpl@V?$RefBaseFunctions@V?$DirectRef@$$CBVErrorInterface@maxon@@VStrongCOWRefHandler@2@VError@2@@maxon@@@maxon@@@Object@maxon@@@ErrorInterface@maxon@@@Object@maxon@@QEBAAEBVComponentInfo@1@PEBV?$ConstReferenceFunctionsImpl@V?$COWReferenceFunctionsImpl@V?$RefBaseFunctions@V?$DirectRef@$$CBVErrorInterface@maxon@@VStrongCOWRefHandler@2@VError@2@@maxon@@@maxon@@@Object@maxon@@@ErrorInterface@1@PEAVPrivateOverloadRank0@1@@Z)
      

      Since we don't want to disable this optimization, we decided not to use maxon::Result for now, replaced it for a std::string returning the error message or empty on success.

      Is it safe to turn on /LTCG in the core.framework?
      How do you suggest we to do so without having to modify the generated project?

      1 Reply Last reply Reply Quote 0
      • S
        s_bach
        last edited by s_bach

        Hello,

        I got some feedback from the developers.

        It seems that these optimizations remove some needed constructors. So we cannot recommend to apply these optimizations. As far as we can see there is no way to use these optimizations.

        best wishes,
        Sebastian

        MAXON SDK Specialist

        Development Blog, MAXON Registered Developer

        rsodreR 1 Reply Last reply Reply Quote 2
        • rsodreR
          rsodre @s_bach
          last edited by

          😞

          Do you know if we're going to hit the same wall with other APIs or is it just particular to Result?

          1 Reply Last reply Reply Quote 0
          • S
            s_bach
            last edited by

            Hello,

            I'm not aware of any other components that won't work with that optimization. But again, we don't use this optimization so I haven't tested that.

            best wishes,
            Sebastian

            MAXON SDK Specialist

            Development Blog, MAXON Registered Developer

            1 Reply Last reply Reply Quote 2
            • First post
              Last post