Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error Using NanoGUI with GLFW(c++) #454

Open
nikhilanayak opened this issue Aug 16, 2020 · 4 comments
Open

Error Using NanoGUI with GLFW(c++) #454

nikhilanayak opened this issue Aug 16, 2020 · 4 comments

Comments

@nikhilanayak
Copy link

I recently started trying to use NanoGUI with GLFW and I keep getting an error.
The specific lines where this error comes from are these:

nanogui::Screen *screen = new nanogui::Screen;
screen->initialize(window, true);

These lines give me this error:

"public: __thiscall nanogui::Screen::Screen(void)" (??0Screen@nanogui@@QAE@XZ) referenced in function _main	OpenGLProject

This is probably a really simple problem but I don't know much c++ and can't seem to figure this out.
Any help would be appreciated.
Thanks!

@Petross404
Copy link

Do you mean that you get this error during linking? If yes, you must be missing some linker flags.

@William-Baker
Copy link

If you're using Visual Studio make sure you've added all the source files to the project directly (so they appear in the solution explorer, use a filter to tidy them up for you). Although I would strongly suggest against using visual studio community & windows. Cross-compiling from Linux, learning CMake and using Ninja will make your life a lot easier when integrating libraries to your project. Apologies if you're using a build system already.

@nikhilanayak
Copy link
Author

@Petross404 Yeah, during the linking I'm getting these errors. What flags should I be adding.

@nikhilanayak
Copy link
Author

Actually, I added all the files from nanogui/src. Now, all of the OpenGL functions become undeclared(glCompileShader, glCreateProgram, etc.). Any idea why?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants