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
    • Unread
    • Recent
    • Tags
    • Users
    • Login

    Compiling for R20... linker error in maxon::String

    Cinema 4D SDK
    r20 r25 c++
    4
    5
    727
    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.
    • fwilleke80F
      fwilleke80
      last edited by

      Hi,

      I know the support for R20 has ended, but maybe someone still has an idea about this:

      I'm building a project for R20 (I develop using mostly R25 for debugging), and it compiles without any warning or errors. However, linking fails with these errors:

      error LNK2019: unresolved external symbol "class maxon::String __cdecl ToString(class String const &,class maxon::FormatStatement const *,bool)" (?ToString@@YA?AVString@maxon@@AEBV1@PEBVFormatStatement@2@_N@Z) referenced in function "void __cdecl maxon::ToStrHlp<class String>(class maxon::String &,class String const *,class maxon::FormatStatement const *)" (??$ToStrHlp@VString@@@maxon@@YAXAEAVString@0@PEBV1@PEBVFormatStatement@0@@Z)
      
      error LNK2019: unresolved external symbol "class maxon::String __cdecl ToString(class Filename const &,class maxon::FormatStatement const *,bool)" (?ToString@@YA?AVString@maxon@@AEBVFilename@@PEBVFormatStatement@2@_N@Z) referenced in function "void __cdecl maxon::ToStrHlp<class Filename>(class maxon::String &,class Filename const *,class maxon::FormatStatement const *)" (??$ToStrHlp@VFilename@@@maxon@@YAXAEAVString@0@PEBVFilename@@PEBVFormatStatement@0@@Z)
      

      Any idea where I should look to fix the error? Obviously, the problem has to do with some ToString() call. But I'm using these a lot throughout the code, and they when I last built for R20, there was no problem.

      Thanks in advance!

      Frank

      www.frankwilleke.de
      Only asking personal code questions here.

      ferdinandF 1 Reply Last reply Reply Quote 0
      • ferdinandF
        ferdinand @fwilleke80
        last edited by ferdinand

        Hey @fwilleke80,

        Thank you for reaching out to us. We will talk about this tomorrow in the SDK Group, and Maxime and Manuel might know here more than I do, but one thing jumps to mind here for me:

        1. Are you sure there are no build fragments in your build directory, so that the linker/compiler cannot get confused? Visual Studio has sometimes the tendency to make a mess.
        2. From which follows, have you stripped the solution from all compilation results? The 'Clean Solution/Build Folder' commands in VS/XCode or unfortunately not very dependable, I would strip the solution by hand or copy over the source files to a new solution.
        3. Regenerating/checking your solution could also solve the problem.

        Cheers,
        Ferdinand

        MAXON SDK Specialist
        developers.maxon.net

        fwilleke80F 1 Reply Last reply Reply Quote 0
        • fwilleke80F
          fwilleke80 @ferdinand
          last edited by fwilleke80

          Hi Ferdinand,

          thanks for your reply!

          @ferdinand said in Compiling for R20... linker error in maxon::String:

          Are you sure there are no build fragments in your build directory, so that the linker/compiler cannot get confused? Visual Studio has sometimes the tendency to make a mess.
          I have made a full rebuild, and cleaned the build, the .vs, and the generated folder before. Is there anything else? Visual Studio does tend to make a mess 😆

          @ferdinand said in Compiling for R20... linker error in maxon::String:

          Regenerating/checking your solution could also solve the problem.
          What do you mean? Deleting the solution file, and making a new one?

          I wish I had tried R20 a bit more often. Last time is three months and hundreds of code changes ago 😢

          Cheers,
          Frank

          www.frankwilleke.de
          Only asking personal code questions here.

          1 Reply Last reply Reply Quote 0
          • ManuelM
            Manuel
            last edited by

            hi,

            As Ferdinand said, you should regenerate the project, that mean start from nothing except the source code and use the projectTools corresponding to the R20 that you can find on this page[URL-REMOVED].

            First thing to do is to compile the r20 sdk to be sure that it is working, then add your source code.
            I would remove as much code i can and isolate the issue.

            As you said R20 is not supported anymore, there is not too much we can do for you.

            Cheers,
            Manuel


            [URL-REMOVED] @maxon: This section contained a non-resolving link which has been removed.

            MAXON SDK Specialist

            MAXON Registered Developer

            1 Reply Last reply Reply Quote 0
            • M
              m_adam
              last edited by

              Hello @fwilleke80 ,

              without further questions or postings, we will consider this topic as solved by Thursday 01/06/2023 and flag it accordingly.

              Thank you for your understanding,
              Maxime.

              MAXON SDK Specialist

              Development Blog, MAXON Registered Developer

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