EGL linker errors

感情迁移 提交于 2019-12-05 20:20:53
Anthony

I managed to fix this by compiling the C++ file to an object file, and then linking as a separate step. I'm not sure why this works, when the one-line compilation doesn't.

g++ -std=c++0x -Wall -Werror -c -o test.o test.cpp 
g++ -o test test.o -lGLESv2 -lEGL

I've put the question to the community to try to figure out why: Single-command compile and link fails, separate steps work

You should put libraries to the end of a command line

g++ -std=c++0x -Wall -Werror -o test test.cpp -lEGL -lGLESv2
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!