Hello Foxel,
My bad, I apologize. When I said version I was being more general meaning 2015, 2017 or 2019 not the specific version number of the program. I do not believe that different versions of VS2019 should be a problem, but I have stranger things happen.
Now I am as stumped as you are, so as a thought I have copied text from a message and pasted it into a text file, using Notepad, only to find that when the program read the file it crashed because of something unseen in the file.
For a small file I solved the problem just by typing the information into a new file. And once or twice I was able to type at the end of the file and delete the original information and that worked.
For larger files I use a Hex editor to look at the individual bytes to see if there is anything that should not be there.
If you do not have a Hex editor I use HxD
https://mh-nexus.de/en/ It is free and simple to use. Worth getting if you do not have anything.
I have code files for , (.cpp) and (.hpp), and found a line of code that looks fine, but the IDE and compiler have a problem with it. I have commented out the offending line and written the exact same thing underneath it and problem solved. And then a time or two I have found that deleting the commented line of code ended up causing a problem with the new line, so I had to put back the deleted line for it to work.
Just had another thought. If one library calls a function in another library the header files for the libraries may need to be reversed or one of the header files may have to include the other to make it work.
Not knowing how big the libraries are I would I would consider rewriting and creating a whole new solution and library files as the last resort.
You could try creating a new solution and library, with a new name, and copy the code need into it compile it and see what happens.
I feel bad because I do not have the experience of some of the others with something like this and I am not sure what to suggest. Most times I do better having something to work with to figure out what is wrong.
Andy