MSVC: Using link.exe manually
I’m attempting to set up a build system named Waf with a test C++ OpenGL/SDL project, and am running into a few issues with the linking process. As far as I can tell, all of the libraries are being found properly, and being added into the linking command, and yet the linking process seems to be acting as if the libraries aren’t linked.
In order to attempt to debug the process, I was trying to run the compilation/link process manually in order to understand exactly how it works with MSVC, but I’m still getting issues. When I run the following LINK.exe command:
I get the same error as usual:
However, I also get some interesting verbose output:
However, my code most definitely uses SDL and SDLmain:
Anybody know what I’m doing wrong here?
EDIT: I have also verified that the same waf script works on both linux and osx, so it seems to be windows specific.
I think your main problem is
which might be the one error where everything else hinges. If I had to guess, I would have to assume that you forgot to add a “main” function… although apparently you didn’t, as I can clearly see it in your posting.