wjakob / nanogui

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

Building with mingw on windows? #166

Closed onurhb closed 8 years ago

onurhb commented 8 years ago

Getting massive amount of errors when I am trying to compile on windows using mingw32. Should work out of the box #27 ?

I am using cmake to generate build files for mingw. Using msys shell to "make" it.

C:\Users\Onur\Desktop\Development\nanogui\src\glutil.cpp:373:32: error: 'glad_glEnable' was not declared in this scope
         glEnable(GL_MULTISAMPLE);
                                ^
C:\Users\Onur\Desktop\Development\nanogui\src\glutil.cpp: In member function 'void nanogui::GLFramebuffer::release()':
C:\Users\Onur\Desktop\Development\nanogui\src\glutil.cpp:378:33: error: 'glad_glDisable' was not declared in this scope
         glDisable(GL_MULTISAMPLE);
                                 ^
C:\Users\Onur\Desktop\Development\nanogui\src\glutil.cpp:379:40: error: 'glad_glBindFramebuffer' was not declared in this scope
     glBindFramebuffer(GL_FRAMEBUFFER, 0);
                                        ^
C:\Users\Onur\Desktop\Development\nanogui\src\glutil.cpp: In member function 'void nanogui::GLFramebuffer::blit()':
C:\Users\Onur\Desktop\Development\nanogui\src\glutil.cpp:383:56: error: 'glad_glBindFramebuffer' was not declared in this scope
     glBindFramebuffer(GL_READ_FRAMEBUFFER, mFramebuffer);
                                                        ^
C:\Users\Onur\Desktop\Development\nanogui\src\glutil.cpp:385:25: error: 'glad_glDrawBuffer' was not declared in this scope
     glDrawBuffer(GL_BACK);
                         ^
C:\Users\Onur\Desktop\Development\nanogui\src\glutil.cpp:388:76: error: 'glad_glBlitFramebuffer' was not declared in this scope
                       GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT, GL_NEAREST);
                                                                            ^
C:\Users\Onur\Desktop\Development\nanogui\src\glutil.cpp: In member function 'void nanogui::GLFramebuffer::downloadTGA(const string&)':
C:\Users\Onur\Desktop\Development\nanogui\src\glutil.cpp:398:39: error: 'glad_glPixelStorei' was not declared in this scope
     glPixelStorei(GL_PACK_ALIGNMENT, 1);
                                       ^
C:\Users\Onur\Desktop\Development\nanogui\src\glutil.cpp:399:56: error: 'glad_glBindFramebuffer' was not declared in this scope
     glBindFramebuffer(GL_READ_FRAMEBUFFER, mFramebuffer);
                                                        ^
C:\Users\Onur\Desktop\Development\nanogui\src\glutil.cpp:400:41: error: 'glad_glBindBuffer' was not declared in this scope
     glBindBuffer(GL_PIXEL_PACK_BUFFER, 0);
                                         ^
C:\Users\Onur\Desktop\Development\nanogui\src\glutil.cpp:401:77: error: 'glad_glReadPixels' was not declared in this scope
     glReadPixels(0, 0, mSize.x(), mSize.y(), GL_BGRA, GL_UNSIGNED_BYTE, temp);
                                                                             ^
C:\Users\Onur\Desktop\Development\nanogui\src\glutil.cpp:406:47: error: 'alloca' was not declared in this scope
     uint8_t *line = (uint8_t *) alloca(rowSize);
wjakob commented 8 years ago

MinGW is not officially supported (#27 was a long time ago, and nobody has been actively maintaining mingw support). You are welcome to submit a PR which addresses these issues.

Snektron commented 7 years ago

Ive managed to build nanogui by updating glad. I've created a PR.

ndrshn commented 7 years ago

@onurhb şuna bir bak istersen [http://stackoverflow.com/questions/24416857/c-error-function-was-not-declared-in-this-scope]