As the title and my amount of posts should make clear I am very new to SFML. (started 4 days ago)
Currently using the C++ sdk. I have around 6-7 months of experience with C++ so I am still unaware of many things within the language, but have gotten used to it already.
When I try to use the OpenGL instructions I get undefined references to each method from the compiler.
I use Code::Blocks with the latest GCC compiler and followed and linked everything it said to be linked in the project's options.
This is my source code:
#include <SFML/System.hpp>
#include <SFML/Window.hpp>
//Window Hpp incluye a Event.hpp y a otras clases, si estas estan en el paquete no es necesario incluirlas.
#include <SFML/System/Randomizer.hpp>
#include <iostream>
int main ()
{ sf::WindowSettings Settings; /// Objeto WindowSettings, permite configurar las opciones graficas deseadas.
///Todas tienen valores default, por lo tanto no es necesario revalorizar dichas opciones.
Settings.DepthBits = 24; // Request a 24 bits depth buffer
Settings.StencilBits = 8; // Request a 8 bits stencil buffer
Settings.AntialiasingLevel = 2; // Request 2 levels of antialiasing
sf::Window App(sf::VideoMode(800, 600, 32), "SFML OpenGL", sf::Style::Close, Settings);
///Crea los datos de la ventana al final y usa las configuraciones dadas por el objeto settings.
/** Aqui empieza el codigo de OpenGL usando como plataforma a SFML*/
// Set color and depth clear value
glClearDepth(1.f);
glClearColor(0.f, 0.f, 0.f, 0.f);
// Enable Z-buffer read and write
glEnable(GL_DEPTH_TEST);
glDepthMask(GL_TRUE);
// Setup a perspective projection
glMatrixMode(GL_PROJECTION);
glLoadIdentity();
gluPerspective(90.f, 1.f, 1.f, 500.f);
}
Please ignore the extra comments I added. My native language is spanish and I tend to write lots of stuff when trying to understand how and what a library does what it does. Also it may seem odd that I have other includes that aren't used in the quoted source code, but it is because there are more implementations of the main function unseen by the compilator via precompilator #if's so as to put everything in the same project and not make many projects for small code examples.
From my understanding and what I have read including window.hpp should be enough to use those functions, but none is recognized. I am compiling in release mode and tried putting every single dll into the project's folder but it changed nothing (only had the window and the system dll's before that).
I think I've given enough info about my issue, however if anything else would be needed I'll gladly add anything I can. Thanks in advance for any possible help I could get.
P.S. I get undefined reference error for the gl functions only. I'll attach the cbp file in case the problem is within the project's settings (searched for such a mistake, but so far found none).
[attachment deleted by admin]