Barejalla Skrivet 28 September 2008 Rapport Dela Skrivet 28 September 2008 (redigerat) Hej. Varför får jag det här erroret: "26 D:\Makefile.win [build Error] *** multiple target patterns. Stop. " Det blir så när jag compilar och runar den här sourcekoden: #ifdef _WINDOWS #include <windows.h> #endif #include <gl/gl.h> #include <gl/glu.h> #include <math.h> #include <CGfxOpenGL.h> // disable implicit float-double casting #pragma warning(disable:4305) CGfxOpenGL::CGfxOpenGL() { } CGfxOpenGL::~CGfxOpenGL() { } bool CGfxOpenGL::Init() { // clear to black background glClearColor(0.0, 0.0, 0.0, 0.0); m_angle = 0.0f; return true; } bool CGfxOpenGL::Shutdown() { return true; } void CGfxOpenGL::SetupProjection(int width, int height) { if (height == 0) // don't want a divide by zero { height = 1; } glViewport(0, 0, width, height); // reset the viewport to new dimensions glMatrixMode(GL_PROJECTION); // set projection matrix current matrix glLoadIdentity(); // reset projection matrix // calculate aspect ratio of window gluPerspective(52.0f,(GLfloat)width/(GLfloat)height,1.0f,1000.0f); glMatrixMode(GL_MODELVIEW); // set modelview matrix glLoadIdentity(); // reset modelview matrix m_windowWidth = width; m_windowHeight = height; } void CGfxOpenGL::Prepare(float dt) { m_angle += 0.1f; } void CGfxOpenGL::Render() { // clear screen and depth buffer glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); glLoadIdentity(); // move back 5 units and rotate about all 3 axes glTranslatef(0.0, 0.0, -5.0f); glRotatef(m_angle, 1.0f, 0.0f, 0.0f); glRotatef(m_angle, 0.0f, 1.0f, 0.0f); glRotatef(m_angle, 0.0f, 0.0f, 1.0f); // lime greenish color glColor3f(0.7f, 1.0f, 0.3f); // draw the triangle such that the rotation point is in the center glBegin(GL_TRIANGLES); glVertex3f(1.0f, -1.0f, 0.0f); glVertex3f(-1.0f, -1.0f, 0.0f); glVertex3f(0.0f, 1.0f, 0.0f); glEnd(); } I Makefile grejen som kommer up står det : # Project: Project1 # Makefile created by Dev-C++ 4.9.9.2 CPP = g++.exe CC = gcc.exe WINDRES = windres.exe RES = OBJ = dw35.o "O:/Övrigt/Game\ Development/API,SDK\ &\ Consoles/OpenGL/Beginning\ OpenGL\ Game\ Programming/Beginning\ OpenGL\ Game\ Programming\ Source\ Code/Beginning\ OpenGL\ Game\ Programming\ Source\ Code/Chapter02/OpenGLApplication/CGfxOpenGL.o" $(RES) LINKOBJ = dw35.o "O:/Övrigt/Game Development/API,SDK & Consoles/OpenGL/Beginning OpenGL Game Programming/Beginning OpenGL Game Programming Source Code/Beginning OpenGL Game Programming Source Code/Chapter02/OpenGLApplication/CGfxOpenGL.o" $(RES) LIBS = -L"lib" -mwindows -lopenglut -lglu32 -lopengl32 -lwinmm -lgdi32 INCS = -I"include" CXXINCS = -I"lib/gcc/mingw32/3.4.2/include" -I"include/c++/3.4.2/backward" -I"include/c++/3.4.2/mingw32" -I"include/c++/3.4.2" -I"include" -I"C:/Dev-Cpp/include" BIN = asr124s.exe CXXFLAGS = $(CXXINCS) -DOPENGLUT_STATIC CFLAGS = $(INCS) -DOPENGLUT_STATIC RM = rm -f .PHONY: all all-before all-after clean clean-custom all: all-before asr124s.exe all-after clean: clean-custom ${RM} $(OBJ) $(BIN) HÄR ÄR ERRORET!! l V $(BIN): $(OBJ) $(CPP) $(LINKOBJ) -o "asr124s.exe" $(LIBS) ^ l HÄR ÄR ERRORET!!! dw35.o: dw35.cpp $(CPP) -c dw35.cpp -o dw35.o $(CXXFLAGS) "O:/Övrigt/Game\ Development/API,SDK\ &\ Consoles/OpenGL/Beginning\ OpenGL\ Game\ Programming/Beginning\ OpenGL\ Game\ Programming\ Source\ Code/Beginning\ OpenGL\ Game\ Programming\ Source\ Code/Chapter02/OpenGLApplication/CGfxOpenGL.o": O:/Övrigt/Game\ Development/API,SDK\ &\ Consoles/OpenGL/Beginning\ OpenGL\ Game\ Programming/Beginning\ OpenGL\ Game\ Programming\ Source\ Code/Beginning\ OpenGL\ Game\ Programming\ Source\ Code/Chapter02/OpenGLApplication/CGfxOpenGL.cpp $(CPP) -c "O:/Övrigt/Game Development/API,SDK & Consoles/OpenGL/Beginning OpenGL Game Programming/Beginning OpenGL Game Programming Source Code/Beginning OpenGL Game Programming Source Code/Chapter02/OpenGLApplication/CGfxOpenGL.cpp" -o "O:/Övrigt/Game Development/API,SDK & Consoles/OpenGL/Beginning OpenGL Game Programming/Beginning OpenGL Game Programming Source Code/Beginning OpenGL Game Programming Source Code/Chapter02/OpenGLApplication/CGfxOpenGL.o" $(CXXFLAGS) MVH Redigerat 28 September 2008 av Barejalla Citera Länk till kommentar Dela på andra sajter More sharing options...
laynus Skrivet 1 Oktober 2008 Rapport Dela Skrivet 1 Oktober 2008 du har nog antagligen länkat det fel Citera Länk till kommentar Dela på andra sajter More sharing options...
Rekommendera inlägg
Gå med i konversationen
Du kan skriva nu och registrera dig senare. Om du har ett konto, logga in nu för att posta med ditt konto.