cannot find -lglew32



  • Hello,
    I´m using the last version of QT creator, I need to modify a project thas was done with glew but I´m unable to link it.

    In my pro file I have:
    INCLUDEPATH += E:/glew
    LIBS += -L/E:/glew -lglew32

    In that folder I have glew32.dll and glew32.lib.

    Still I get the same error cannot find -lglew32.

    Any help will be greatly apreciated, thank you,


  • Moderators

    Hi, welcome to devnet.

    It should be LIBS += -LE:/glew -lglew32. Notice no extra / before the path.



  • Thank you!
    that was silly... >.<

    But now I'm getting the "undefined reference to 'imp_____glew....'

    Hope somebody can help-

    Thanks.


  • Moderators

    Few things to mark off the checklist:

    • Have you re-run qmake after making the change in .pro file? The changes are not always picked up automatically.
    • Are you absolutely sure file E:/glew/glew32.lib exists at that location? I'm asking because the distributed zip has it usually in something like .../glew/lib/Release/x64/glew32.lib subfolder.
    • What compiler are you using (MinGW/VS20XX)? Is it the same as the one used to build glew?
    • Do you use precompiled libraries or did you build glew yourself?
    • Have you tried linking to the static version (define #define GLEW_STATIC and link to glew32s.lib)?


  • @Chris-Kawa said:

    build

    Hi I've been trying all day before asking again for help but at this point I feel useless.

    I've uninstalled and download qt creator, now I'm using vs2013 kit.
    I'm using the binary library from the glew page.

    This is my pro file :

    QT += core gui
    QT += opengl
    ...
    INCLUDEPATH += E:\Downloads\glew-1.12.0-win32\glew-1.12.0\include
    LIBS += -LE:\Downloads\glew-1.12.0-win32\glew-1.12.0\lib\Release\x64 -lglew32

    This is the output:

    C:\Qt\Qt5.5.0\Tools\QtCreator\bin\jom.exe -f Makefile.Debug
    cl -c -nologo -Zc:wchar_t -FS -Zi -MDd -GR -W3 -w34100 -w34189 -w44996 -EHsc /Fddebug\untitled5.pdb -DUNICODE -DWIN32 -DWIN64 -DQT_OPENGL_LIB -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB -I..\untitled5 -I. -IE:\Downloads\glew-1.12.0-win32\glew-1.12.0\include -I........\Qt\Qt5.5.0\5.5\msvc2013_64\include -I........\Qt\Qt5.5.0\5.5\msvc2013_64\include\QtOpenGL -I........\Qt\Qt5.5.0\5.5\msvc2013_64\include\QtWidgets -I........\Qt\Qt5.5.0\5.5\msvc2013_64\include\QtGui -I........\Qt\Qt5.5.0\5.5\msvc2013_64\include\QtANGLE -I........\Qt\Qt5.5.0\5.5\msvc2013_64\include\QtCore -Idebug -I........\Qt\Qt5.5.0\5.5\msvc2013_64\mkspecs\win32-msvc2013 -Fodebug\ @C:\Users\pabpada\AppData\Local\Temp\glslprogram.obj.1876.63.jom
    glslprogram.cpp
    cl -c -nologo -Zc:wchar_t -FS -Zi -MDd -GR -W3 -w34100 -w34189 -w44996 -EHsc /Fddebug\untitled5.pdb -DUNICODE -DWIN32 -DWIN64 -DQT_OPENGL_LIB -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB -I..\untitled5 -I. -IE:\Downloads\glew-1.12.0-win32\glew-1.12.0\include -I........\Qt\Qt5.5.0\5.5\msvc2013_64\include -I........\Qt\Qt5.5.0\5.5\msvc2013_64\include\QtOpenGL -I........\Qt\Qt5.5.0\5.5\msvc2013_64\include\QtWidgets -I........\Qt\Qt5.5.0\5.5\msvc2013_64\include\QtGui -I........\Qt\Qt5.5.0\5.5\msvc2013_64\include\QtANGLE -I........\Qt\Qt5.5.0\5.5\msvc2013_64\include\QtCore -Idebug -I........\Qt\Qt5.5.0\5.5\msvc2013_64\mkspecs\win32-msvc2013 -Fodebug\ @C:\Users\pabpada\AppData\Local\Temp\glutils.obj.1876.78.jom
    glutils.cpp
    ..\untitled5\glutils.cpp(7) : warning C4100: 'line' : par metro formal sin referencia
    ..\untitled5\glutils.cpp(7) : warning C4100: 'file' : par metro formal sin referencia
    ..\untitled5\glslprogram.cpp(29) : warning C4267: 'inicializando' : conversi¢n de 'size_t' a 'const GLint'; posible p‚rdida de datos
    cl -c -nologo -Zc:wchar_t -FS -Zi -MDd -GR -W3 -w34100 -w34189 -w44996 -EHsc /Fddebug\untitled5.pdb -DUNICODE -DWIN32 -DWIN64 -DQT_OPENGL_LIB -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB -I..\untitled5 -I. -IE:\Downloads\glew-1.12.0-win32\glew-1.12.0\include -I........\Qt\Qt5.5.0\5.5\msvc2013_64\include -I........\Qt\Qt5.5.0\5.5\msvc2013_64\include\QtOpenGL -I........\Qt\Qt5.5.0\5.5\msvc2013_64\include\QtWidgets -I........\Qt\Qt5.5.0\5.5\msvc2013_64\include\QtGui -I........\Qt\Qt5.5.0\5.5\msvc2013_64\include\QtANGLE -I........\Qt\Qt5.5.0\5.5\msvc2013_64\include\QtCore -Idebug -I........\Qt\Qt5.5.0\5.5\msvc2013_64\mkspecs\win32-msvc2013 -Fodebug\ @C:\Users\pabpada\AppData\Local\Temp\scenebasic.obj.1876.110.jom
    scenebasic.cpp
    ..\untitled5\scenebasic.cpp(174) : warning C4100: 't' : par metro formal sin referencia
    cl -c -nologo -Zc:wchar_t -FS -Zi -MDd -GR -W3 -w34100 -w34189 -w44996 -EHsc /Fddebug\untitled5.pdb -DUNICODE -DWIN32 -DWIN64 -DQT_OPENGL_LIB -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB -I..\untitled5 -I. -IE:\Downloads\glew-1.12.0-win32\glew-1.12.0\include -I........\Qt\Qt5.5.0\5.5\msvc2013_64\include -I........\Qt\Qt5.5.0\5.5\msvc2013_64\include\QtOpenGL -I........\Qt\Qt5.5.0\5.5\msvc2013_64\include\QtWidgets -I........\Qt\Qt5.5.0\5.5\msvc2013_64\include\QtGui -I........\Qt\Qt5.5.0\5.5\msvc2013_64\include\QtANGLE -I........\Qt\Qt5.5.0\5.5\msvc2013_64\include\QtCore -Idebug -I........\Qt\Qt5.5.0\5.5\msvc2013_64\mkspecs\win32-msvc2013 -Fodebug\ @C:\Users\pabpada\AppData\Local\Temp\main.obj.1876.78.jom
    main.cpp
    cl -c -nologo -Zc:wchar_t -FS -Zi -MDd -GR -W3 -w34100 -w34189 -w44996 -EHsc /Fddebug\untitled5.pdb -DUNICODE -DWIN32 -DWIN64 -DQT_OPENGL_LIB -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB -I..\untitled5 -I. -IE:\Downloads\glew-1.12.0-win32\glew-1.12.0\include -I........\Qt\Qt5.5.0\5.5\msvc2013_64\include -I........\Qt\Qt5.5.0\5.5\msvc2013_64\include\QtOpenGL -I........\Qt\Qt5.5.0\5.5\msvc2013_64\include\QtWidgets -I........\Qt\Qt5.5.0\5.5\msvc2013_64\include\QtGui -I........\Qt\Qt5.5.0\5.5\msvc2013_64\include\QtANGLE -I........\Qt\Qt5.5.0\5.5\msvc2013_64\include\QtCore -Idebug -I........\Qt\Qt5.5.0\5.5\msvc2013_64\mkspecs\win32-msvc2013 -Fodebug\ @C:\Users\pabpada\AppData\Local\Temp\mainview.obj.1876.94.jom
    mainview.cpp
    link /NOLOGO /DYNAMICBASE /NXCOMPAT /DEBUG /SUBSYSTEM:WINDOWS "/MANIFESTDEPENDENCY:type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' publicKeyToken='6595b64144ccf1df' language='' processorArchitecture=''" /MANIFEST:embed /OUT:debug\untitled5.exe @C:\Users\pabpada\AppData\Local\Temp\untitled5.exe.1876.4057.jom
    glutils.obj : error LNK2019: símbolo externo __imp_glGetError sin resolver al que se hace referencia en la función "public: static int __cdecl GLUtils::checkForOpenGLError(char const *,int)" (?checkForOpenGLError@GLUtils@@SAHPEBDH@Z)
    glutils.obj : error LNK2019: símbolo externo __imp_glGetIntegerv sin resolver al que se hace referencia en la función "public: static void __cdecl GLUtils::dumpGLInfo(bool)" (?dumpGLInfo@GLUtils@@SAX_N@Z)
    glutils.obj : error LNK2019: símbolo externo __imp_glGetString sin resolver al que se hace referencia en la función "public: static void __cdecl GLUtils::dumpGLInfo(bool)" (?dumpGLInfo@GLUtils@@SAX_N@Z)
    mainview.obj : error LNK2019: símbolo externo __imp_glClearColor sin resolver al que se hace referencia en la función "protected: virtual void __cdecl MainView::initializeGL(void)" (?initializeGL@MainView@@MEAAXXZ)
    scenebasic.obj : error LNK2001: símbolo externo __imp_glClearColor sin resolver
    scenebasic.obj : error LNK2019: símbolo externo __imp_glClear sin resolver al que se hace referencia en la función "public: virtual void __cdecl SceneBasic::render(void)" (?render@SceneBasic@@UEAAXXZ)
    scenebasic.obj : error LNK2019: símbolo externo __imp_glDrawArrays sin resolver al que se hace referencia en la función "public: virtual void __cdecl SceneBasic::render(void)" (?render@SceneBasic@@UEAAXXZ)
    scenebasic.obj : error LNK2019: símbolo externo __imp_glViewport sin resolver al que se hace referencia en la función "public: virtual void __cdecl SceneBasic::resize(int,int)" (?resize@SceneBasic@@UEAAXHH@Z)
    debug\untitled5.exe : fatal error LNK1120: 7 externos sin resolver
    jom: C:\Users\pabpada\Documents\build-untitled5-Desktop_Qt_5_5_0_MSVC2013_64bit-Debug\Makefile.Debug [debug\untitled5.exe] Error 1120
    jom: C:\Users\pabpada\Documents\build-untitled5-Desktop_Qt_5_5_0_MSVC2013_64bit-Debug\Makefile [debug] Error 2
    00:22:03: The process "C:\Qt\Qt5.5.0\Tools\QtCreator\bin\jom.exe" exited with code 2.
    Error while building/deploying project untitled5 (kit: Desktop Qt 5.5.0 MSVC2013 64bit)
    When executing step "Make"
    00:22:03: Elapsed time: 00:05.

    I'm getting crazy any tip would be apreciated



  • Still trying to make it work, I'm desperate now.
    I´ve tried in 3 diferents computers (desktop and laptop) and I always get to the same point: unresolved external symbol....
    Hope someone can help

    @sasiro said:

    glutils.obj : error LNK2019: símbolo externo __imp_glGetError sin resolver al que se hace referencia en la función "public: static int __cdecl GLUtils::checkForOpenGLError(char const *,int)" (?checkForOpenGLError@GLUtils@@SAHPEBDH@Z)
    glutils.obj : error LNK2019: símbolo externo __imp_glGetIntegerv sin resolver al que se hace referencia en la función "public: static void __cdecl GLUtils::dumpGLInfo(bool)" (?dumpGLInfo@GLUtils@@SAX_N@Z)
    glutils.obj : error LNK2019: símbolo externo __imp_glGetString sin resolver al que se hace referencia en la función "public: static void __cdecl GLUtils::dumpGLInfo(bool)" (?dumpGLInfo@GLUtils@@SAX_N@Z)
    mainview.obj : error LNK2019: símbolo externo __imp_glClearColor sin resolver al que se hace referencia en la función "protected: virtual void __cdecl MainView::initializeGL(void)" (?initializeGL@MainView@@MEAAXXZ)
    scenebasic.obj : error LNK2001: símbolo externo __imp_glClearColor sin resolver
    scenebasic.obj : error LNK2019: símbolo externo __imp_glClear sin resolver al que se hace referencia en la función "public: virtual void __cdecl SceneBasic::render(void)" (?render@SceneBasic@@UEAAXXZ)
    scenebasic.obj : error LNK2019: símbolo externo __imp_glDrawArrays sin resolver al que se hace referencia en la función "public: virtual void __cdecl SceneBasic::render(void)" (?render@SceneBasic@@UEAAXXZ)
    scenebasic.obj : error LNK2019: símbolo externo __imp_glViewport sin resolver al que se hace referencia en la función "public: virtual void __cdecl SceneBasic::resize(int,int)" (?resize@SceneBasic@@UEAAXHH@Z)
    debug\untitled5.exe : fatal error LNK1120: 7 externos sin resolver


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.