AKGWSB/EzRT

part3 运行main.exe什么都没出现马上就停止了

zcq2542 opened this issue · 1 comments

glm soil2 glew freeglut 都用vcpkg安装了,在source code 里新建了一个build 目录, cmake -S ../ -B ./ -G "MinGW Makefiles" 得到Make file, 用mingw32-make.exe 得到main.exe
我用gdb得到一下信息:
image
ChatGPT说The exit code 0xc0000135 indicates that your program is failing to start because it cannot find a necessary DLL (Dynamic Link Library). This error often occurs when the required runtime libraries are not installed on your system or the application is unable to locate them. Here’s what you can do to resolve the issue:

  1. Check Dependencies:
    Ensure that all necessary libraries required by your application, including those needed by GLUT and GLEW, are correctly installed on your machine.

  2. Path Environment Variable:
    Verify that the directories containing the required DLLs are listed in your system’s PATH environment variable. This helps the operating system locate the necessary libraries.

  3. Runtime Libraries:
    If your application depends on specific runtime libraries (like the Visual C++ Redistributable for Visual Studio), make sure they are installed. The version needed (e.g., 2015, 2017, 2019, etc.) must match the one your application was built with.

  4. Debugging Tools:
    Use tools like Dependency Walker or Microsoft's Process Monitor to check which DLLs are missing or failing to load.

  5. Rebuild the Application:
    If you have access to the source code, ensure that all project dependencies are correctly configured, and try rebuilding the application.

  6. GLEW Initialization:
    Make sure that GLEW is initialized after creating an OpenGL context with GLUT (glutCreateWindow), as calling glewInit() before an OpenGL context is available can cause failures.

  7. Check the Documentation:
    Review the documentation for GLUT and GLEW to ensure you are using them correctly and have all necessary files.

Addressing the issue usually involves making sure that all the necessary runtime components are installed and correctly configured on your system.
请问应该怎么排查比较好呢?(是因为用的是VSCode没有用VS studio而少了一些ddl吗)