wjakob / nanogui

Minimalistic GUI library for OpenGL
Other
4.66k stars 608 forks source link

Error while running the Exampl #292

Open AnexJ opened 6 years ago

AnexJ commented 6 years ago

I am a noob at OpenGl let alone C++ when i run the example 1 program i get the Errors: /home/knight/Documents/passEngine/passEngine/main.cpp|611|undefined reference to nanogui::init()'| /home/knight/Documents/passEngine/passEngine/main.cpp|616|undefined reference tonanogui::Screen::setVisible(bool)'| /home/knight/Documents/passEngine/passEngine/main.cpp|617|undefined reference to nanogui::mainloop(int)'| /home/knight/Documents/passEngine/passEngine/main.cpp|620|undefined reference tonanogui::shutdown()'| There's more but mostly the repetition of that

svenevs commented 6 years ago

Hi @AnexJ, it seems like you are not linking against nanogui, only including the files. The documentation for getting nanogui going with CMake (highly advisable) is here.

If you already have done this, please include more information about your build system. Specifically, how exactly you are doing target_link_libraries. There's also an example repository you can compare how you did the setup with.

Hope that helps some!