cannot open file 'soil2-debug.lib

Yairk_kaufmann 6 Reputation points
2021-05-29T12:24:46.507+00:00

I'm trying to create an opengl window with c ++ but I encounter this error "cannot open file 'soil2-debug.lib'" (I added the folder to linker> general)

That's the code

#include "libs.h"

int main ()
{
glfwInit ();


const int WINDOW_WIDTH = 640;
const int WINDOW_HEIGHT = 480;
int FramebufferWidth = 0;
int FramebufferHeight = 0;


glfwWindowHint (GLFW_OPENGL_PROFILE, GLFW_OPENGL_CORE_PROFILE);
glfwWindowHint (GLFW_CONTEXT_VERSION_MAJOR, 4);
glfwWindowHint (GLFW_CONTEXT_VERSION_MINOR, 4);
glfwWindowHint (GLFW_RESIZABLE, GLFW_FALSE);
glfwWindowHint (GLFW_OPENGL_FORWARD_COMPAT, GL_TRUE);


GLFWwindow * window = glfwCreateWindow (WINDOW_WIDTH, WINDOW_HEIGHT, "Yairk_bit", NULL, NULL);


glfwGetFramebufferSize (window, & FramebufferWidth, & FramebufferHeight);
glViewport (0, 0, FramebufferWidth, FramebufferHeight);

glfwMakeContextCurrent (window);

glewExperimental = GL_TRUE;

if (glewInit ()! = GLEW_OK)
{
std :: cout << "ERR :: main.cpp :: GlewInit Faild" << "\ n";
glfwTerminate ();
}

while (! glfwWindowShouldClose (window))
{

}

glfwTerminate ();



return 0;
}
C++
C++
A high-level, general-purpose programming language, created as an extension of the C programming language, that has object-oriented, generic, and functional features in addition to facilities for low-level memory manipulation.
3,914 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Jeanine Zhang-MSFT 11,341 Reputation points Microsoft External Staff
    2021-05-31T02:00:19.547+00:00

    Hi,

    As far as I'm concerned, you should add the path to the .lib file to the Additional Library Directories (property -> linker -> General -> Additional Library Directories). I suggest you check if the path of .lib is correct.

    And make sure in Visual Studio you are always adding the paths to all your configurations (Debug/Release).

    Best Regards,

    Jeanine


    If the response is helpful, please click "Accept Answer" and upvote it.

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.