Я с успехом использую SDL для изучения OpenGL, однако я следую учебным пособиям, в которых используется GLUT, и я попытался перейти на GLUT, потому что он выглядит более удобным для новичков, и я чувствую, что быстрее подберу контент.Я думал, что это будет простой быстрый и безболезненный процесс, однако я сталкиваюсь со следующей проблемой при попытке скомпилировать контент GLUT (используя MinGW) (я скачал GLUT и извлек заголовочный файл в мои включения, чтобы он был включен правильно, и я также извлек файлы lib в папку lib, и я ссылаюсь на нее, в моей system32 присутствует .DLL для перенасыщения, поэтому он успешно вызывается.
Я не знаю, какчто я делаю не так и был бы признателен за любую помощь и предложения
Создание сообщений при компиляции следующего небольшого фрагмента контента (который в данный момент ничего не будет делать, но должен компилироваться):
#include <stdlib.h>
#include <GL/glut.h>
static int day = 0, year = 0;
void init()
{
glClearColor(0.0,0.0,0.0,0.0);
glShadeModel(GL_FLAT);
}
void display(void)
{
glClear(GL_COLOR_BUFFER_BIT);
glColor3f(1.0,1.0,1.0);
glPushMatrix();
glutWireSphere(1.0,20,16);
glRotatef((GLfloat) year, 0.0,1.0,0.0);
glTranslatef(2.0,0.0,0.0);
glRotatef((GLfloat) day, 0.0, 1.0, 0.0);
glutWireSphere(0.2,10,8);
glPopMatrix();
glutSwapBuffers();
}
//void reshape(int w, int h)
int main(int argc, char **argv)
{
}
Ошибки строителя:
C:\Documents and Settings\User\Desktop\test.o:test.cpp|| undefined reference to `__glutInitWithExit'|
C:\Documents and Settings\User\Desktop\test.o:test.cpp|| undefined reference to `__glutCreateWindowWithExit'|
C:\Documents and Settings\User\Desktop\test.o:test.cpp|| undefined reference to `__glutCreateMenuWithExit'|
C:\Documents and Settings\User\Desktop\test.o:test.cpp|| undefined reference to `_imp__glClearColor'|
C:\Documents and Settings\User\Desktop\test.o:test.cpp|| undefined reference to `_imp__glShadeModel'|
C:\Documents and Settings\User\Desktop\test.o:test.cpp|| undefined reference to `_imp__glClear'|
C:\Documents and Settings\User\Desktop\test.o:test.cpp|| undefined reference to `_imp__glColor3f'|
C:\Documents and Settings\User\Desktop\test.o:test.cpp|| undefined reference to `_imp__glPushMatrix'|
C:\Documents and Settings\User\Desktop\test.o:test.cpp|| undefined reference to `glutWireSphere'|
C:\Documents and Settings\User\Desktop\test.o:test.cpp|| undefined reference to `_imp__glRotatef'|
C:\Documents and Settings\User\Desktop\test.o:test.cpp|| undefined reference to `_imp__glTranslatef'|
C:\Documents and Settings\User\Desktop\test.o:test.cpp|| undefined reference to `_imp__glRotatef'|
C:\Documents and Settings\User\Desktop\test.o:test.cpp|| undefined reference to `glutWireSphere'|
C:\Documents and Settings\User\Desktop\test.o:test.cpp|| undefined reference to `_imp__glPopMatrix'|
C:\Documents and Settings\User\Desktop\test.o:test.cpp|| undefined reference to `glutSwapBuffers'|
||=== Build finished: 15 errors, 0 warnings ===|