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

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)" ([email protected]@[email protected]@@[email protected]@[email protected][email protected]) referenced in function "void __cdecl maxon::ToStrHlp<class String>(class maxon::String &,class String const *,class maxon::FormatStatement const *)" ([email protected]@@@[email protected]@[email protected]@[email protected]@[email protected]@Z)

error LNK2019: unresolved external symbol "class maxon::String __cdecl ToString(class Filename const &,class maxon::FormatStatement const *,bool)" ([email protected]@[email protected]@@[email protected]@[email protected]@[email protected]) referenced in function "void __cdecl maxon::ToStrHlp<class Filename>(class maxon::String &,class Filename const *,class maxon::FormatStatement const *)" ([email protected]@@@[email protected]@[email protected]@[email protected]@[email protected]@@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

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

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

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.

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