Skip to content

terminate called after throwing an instance of 'int' #20

@cqxm63

Description

@cqxm63

I was in the part of organizing, and when i finished to copy all the code, I ran it and it got me a error that says terminate called after throwing an instance of 'int', the code is exactly the same like the tutorial.

Im using visual studio code, using the mingw, and Im not sure if that affects, also Im going to show the opengl tutorial, is exactly the same like the code of the part of video of organizing, but I just will take screenshots of how is the explorer

Screenshot 2023-04-12 103105

Also, Im showing what is in the makefile
Screenshot 2023-04-12 103052
And that's it.
And I was searching on internet, and I realize that the error probably is in the shaderClass.cpp, because in a part of the code says throw(errno), and based on google errno is "is a preprocessor macro used for error indication. It expands to a static (until C++11)thread-local (since C++11) modifiable lvalue of type int.", so I think this is the error, and that the function get_file_contents its not working well, and I think that the reason is the function cannot read the default.verg, and the default.frag. So, How can I fix this problem?

Also, I just remove the throw(errno), and now works, but with not orange triangles. So, yes that is the problem, I want with the shaders, and also because I think I will need to use the shaders, so how can I fix the error?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions