Glew 2.1.0 (Slackware current), weird unresolved symbol woes.
Got a little GL pet project that used to work just fine, but after a hiatus from it, and some updates to current , this happens:
Code:
|| /usr/bin/ld: CMakeFiles/spacemen.dir/src/renderer_sdl.cpp.o: undefined reference to symbol '__glewDeleteRenderbuffers' However: Code:
readelf -Ws /usr/lib64/libGLEW.so | grep -i deleteren Am I missing something here? This has me confused enough that I'm not even sure about additional infos I could be giving right now. |
something is referencing (such as a function call) the name "__glewDeleteRenderbuffers". a quick google search suggests it may be a misspelling somewhere. if it isn't your code doing that, it may be hard for you to fix it. google for it yourself and look through those results.
|
Quote:
|
Start thinking about using GLAD instead of GLEW? I think GLEW will become deprecated (?)
target_link_libraries(GLEW GL GLU) |
Quote:
I recreated the build environment several times, no avail (cmake 3.15), and while I found some 'cmake find' code specific to NVIDIA (their shader sdk had a custom find module for the various GL things, including GLEW and added some remarks in the script about how 3.15 required some workarounds), it doesn't seem to be the source of the problem. I'm gonna try a bit more and if it won't work then I'm just gonna write up an isolated case for GLEW without as much context as the problematic project (SDL2, CEGUI, etc). It just all worked before and the GLEW lib does seem to export the function as written, but yeah, I'll try a bit more, thanks for the replies so far. Also, I'll look into GLAD, too, if things don't improve, thanks. |
You can sometimes get that error when objects are passed to the linker in the wrong order. Try reordering them and putting -lGLEW after any objects that use it.
|
It turns out that, for some reason unknown to me (cause I'm ignorant about the inner workings) that
Code:
target_link_libraries(project project ${GLEW_LIBRARY} ... ) Code:
target_link_libraries(project project ${GLEW_LIBRARIES} ... ) So, yeah, weird. |
All times are GMT -5. The time now is 08:57 AM. |