Debugging the linker
Sometimes the link step doesn't go as we expect and we need good information to figure out what's wrong. But the problems are on a user's machine, not our own. So when this occurs, walk a user through these instructions to generate a log file which we can examine to figure out what might be wrong with either the linker's code or the user's installation.
- Open up the user's environment variables and add a new one "SDS2_LINKER_LOG_FILE"
- Set this to a valid filepath in a directory they can write to, something like "C:\Users\theiruser\linker.log"
- Run your program like normal
- Ask them to send you this linker.log file
- Have them remove that "SDS2_LINKER_LOG_FILE" environment variable and delete linker.log once it's sent.
For developers, you can just set SDS2_LINKER_LOG_FILE to a valid path at the command line and run your program.
If you set SDS2_LINKER_LOG_FILE to "stdout" it will dump to standard out instead of a file. This can be handy for programmers debugging console applications.