I am doing a school assignment involving graphics programming and it uses freeglut. I've had to install WSL, and have been given starter code on which to run a test compile. It compiles just fine (using the appropriate Makefile they've provided for WSL users), however when I run it I get an error.
"The application was unable to start correctly (0xc000007b). Click OK to close the application."
Note: This error occurs when running it with both WSL command line and windows explorer.
Note 2: I've been able to the other starter code that didn't use freeglut.
I set everything up according to the following official class tutorial
I've tried so many different things to fix it, I made a class discussion thread, which I am not sure you'd be able to access if I linked it, so I will try and copy-paste my correspondence from there over here. It lists the things I've tried (talked with a TA, if you see the name 'Nick' here that's why):
[COPY-PASTED DISCUSSION BEGINS HERE]
Update #1: I've opened the program in Dependency Walker and it does not show any missing .DLL's. That, coupled with the fact that the program compiles just fine, leads me to believe I'm not missing any .dll requirements (if that line of thinking is correct). But I'm open to other ideas.
Update #2: I've tried everything in this list , but still no luck. The only other explanation I found was on stack overflow, where it said this could be caused by trying to run 64 bit executables on a 32 bit system, or vice versa. My local machine is a 64-bit windows 10, and I setup everything exactly according to Nick's Win 10 instructions (I'm assuming his setup was for 64 bit, right?).
Note: The above list I linked included the following:
Run The Application As Administrator Reinstall The Application Update .NET Framework Reinstall Microsoft Visual C++ Redistributable Package Update Your Windows Operating System Troubleshoot Compatibility Check Your Hard Drive For Errors Perform A Clean Boot Run System File Checker
I've tried all of them.
No luck still, I've tried everything you recommended here: Updated to WSL2, (Reinstalled minGW, made sure the freeglut.dll came from the /x64/ folder (I've actually done this several times), and that this .dll was also copied into my system32 and sysWOW64 folders.
I noticed avast antivirus would sometimes scan run.exe when it started up, so I even tried a full uninstall of avast and rebooted my computer; that didn't work either.
I've run the compatibility troubleshooter you mentioned a few times before, it tried running in other environments (Windows 8, and I believe Service Pack 2, but these didn't work) - but this time I selected 'program isn't displaying correctly', then selected the option to report to windows & search online for solutions, when I did this the following menu came up:
Update #4: Am googling and trying to mess around with dependency walker to see if I can only get it to search WSL folders, but it is difficult to determine whether the problem exists in my WSL installation, or my local machine. I will try to troubleshoot both but have a strong inclination that it's my local machine since there is no error whatsoever in compiling. This is what it looks like whenever I compile:
ghost@DESKTOP-H4I6ES7:/mnt/c/Users/Anthony/Documents/CS 478/HW1_starter/q3$ make x86_64-w64-mingw32-g++ main.o -lopengl32 -lfreeglut -lglu32 -o run.exe
And, I'm not sure if this is relevant, but just for some additional information, here are the contents of my 'GL' folder in WSL:
Note: I am not the biggest techie yet, but will try to do my best to understand any answers or advice given. It is much appreciated. Thank you!
User contributions licensed under CC BY-SA 3.0