As usual while waiting for the next release - don't forget to check the nightly builds in the forum.
Debug Win32\Scene.o:: In function `ZN5Scene10initializeEv':C:/Documents and Settings/Jasper/My Documents/Visual Studio 2005/Projects/GameEngine/GameEngine/Scene.cpp:26: undefined reference to `Triangle::Triangle(Vertex, Vertex, Vertex, float)'Debug Win32\Scene.o:: In function `ZN5Scene6updateEf':C:/Documents and Settings/Jasper/My Documents/Visual Studio 2005/Projects/GameEngine/GameEngine/Scene.cpp:46: undefined reference to `Triangle::update(float:: === Build finished: 0 errors, 0 warnings ===
#include "Scene.h"#include "Triangle.h" // included this trying (but failing) to fix the problem// Triangle.h, Vertex.h and DrawEngine.h are all actually included in the headerScene::Scene(DrawEngine *arg_drawEngine, ErrorHandler *arg_errorHandler){ drawEngine = arg_drawEngine; errorHandler = arg_errorHandler; triangle = NULL;} // SceneScene::~Scene(){ clearAll();} // ~Scenebool Scene::initialize(){ Vertex v1(0.866f, -0.5f, 0.0f); Vertex v2(0.0f, 1.0f, 0.0f); Vertex v3(-0.866f, -0.5f, 0.0f); /* ---------------------- the following line gives our first error ------------------------ */ triangle = new Triangle(v1, v2, v3, 0.0f); if (!triangle) { return false; } return true;} // initializebool Scene::clearAll(){ SAFE_DELETE(triangle); return true;} // clearAllbool Scene::update(float deltaTime){ /*----------------- and this line gives the next error------------------- */ triangle->update(deltaTime * 30.0f); drawEngine->render(triangle); return true;} // update
#ifndef Triangle_h#define Triangle_h#include "Vertex.h"class Triangle{public: Triangle(Vertex vertex1, Vertex vertex2, Vertex vertex3, float arg_angle); virtual ~Triangle(); void update(float arg_angle); Vertex v1; Vertex v2; Vertex v3; float angle;};#endif // Triangle_h
#include "Triangle.h"Triangle::Triangle(Vertex vertex1, Vertex vertex2, Vertex vertex3, float arg_angle){ v1 = vertex1; v2 = vertex2; v3 = vertex3; angle = arg_angle;} // TriangleTriangle::~Triangle(){} // ~Trianglevoid Triangle::update(float arg_angle){ angle += arg_angle;} // update
-------------- Build: Debug Win32 in GameEngine ---------------mingw32-g++.exe -LC:\MinGW\lib -o GameEngine.exe "Debug Win32\DrawEngine.o" "Debug Win32\ErrorHandler.o" "Debug Win32\FileHandler.o" "Debug Win32\Game.o" "Debug Win32\Scene.o" "Debug Win32\Vertex.o" "Debug Win32\main.o" "Debug Win32\Core.o" -lglfw -lopengl32 -luser32 -lglu32 -mwindowsDebug Win32\Scene.o: In function `ZN5Scene10initializeEv':C:/Documents and Settings/Jasper/My Documents/Visual Studio 2005/Projects/GameEngine/GameEngine/Scene.cpp:26: undefined reference to `Triangle::Triangle(Vertex, Vertex, Vertex, float)'Debug Win32\Scene.o: In function `ZN5Scene6updateEf':C:/Documents and Settings/Jasper/My Documents/Visual Studio 2005/Projects/GameEngine/GameEngine/Scene.cpp:46: undefined reference to `Triangle::update(float)'collect2: ld returned 1 exit statusProcess terminated with status 1 (0 minutes, 0 seconds)0 errors, 0 warnings