My app compiles with the 32-bit version of mingw inside of Windows. I've been trying to cross compile from WSL2 using the 64-bit version of mingw.
Both apps compile, but only the 32-bit version works. The 64-bit executable gives a "The application was unable to start correctly (0xc000007b)" error when trying to run the executable. I've busted out Dependency Walker, and there is a clear difference in how the libraries are loaded.
The top screenshot is the 64-bit executable and the bottom one is the 32-bit executable.
I'm fairly certain this is the problem, because when I tried to run the application from the Windows "Run" app, it gave the error "The procedure entry point glfwCreateWindow could not be located in the dynamic link library".
In the path environment variables, I have both the 32-bit and the 64-bit libraries for glew and glfw, but the 64-bit ones are searched before the 32-bit ones, and glfw is being searched before glew.
The main problem is that I don't understand why the load-linker is trying to get glew to handle the glfw calls in the 64-bit executable when it's not in the 32-bit executable. I don't really know where to go from here. Any fixes, redirections to duplicate questions, and all reader's time is appreciated!