简体   繁体   English

SFML-找不到gluPerspective函数

[英]SFML - gluPerspective function not found

Out of all of the functions which aren't referenced, my gluPerspective returns an error when I try to use it. 在所有未引用的函数中,当我尝试使用它时,我的gluPerspective返回一个错误。 I know it has nothing to do with syntax or human error: I've been copy/pasting the line of code used by it right out of an SFML tutorial. 我知道这与语法或人为错误无关:我一直在SFML教程中复制/粘贴其使用的代码行。

I'm using QT Creator. 我正在使用QT Creator。

Could someone tell me why this may be the case, and if so what I could do about it? 有人可以告诉我为什么会这样吗,如果可以,我该怎么办? Do I need to reference a library to my qmake file? 我需要引用库到我的qmake文件吗?

A function not being referenced sounds like a linker error. 未被引用的功能听起来像链接器错误。 Have you linked to the glu library? 您已链接到glu库吗?

我找到了解决方案:

LIBS += -lglut -lGLU

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM