Hey,
I'm working on a small OpenGL project and I would like to use C++11 however when I'm trying to compile I get errors :/ Those errors aren't happening when I'm using C++98.
g++ -std=c++11 -Wall -I/opt/local/include -Iinclude src/main.cpp -o src/main.o
Undefined symbols for architecture x86_64:
"RenderWindow::init(std::basic_string<char, std::char_traits<char>, std::allocator<char> >, int, int)", referenced from:
_main in ccLk05Ex.o
"RenderWindow::show()", referenced from:
_main in ccLk05Ex.o
"RenderWindow::shutdown()", referenced from:
_main in ccLk05Ex.o
"RenderWindow::instance_", referenced from:
RenderWindow::getInstance() in ccLk05Ex.o
"RenderWindow::RenderWindow()", referenced from:
RenderWindow::getInstance() in ccLk05Ex.o
ld: symbol(s) not found for architecture x86_64
collect2: error: ld returned 1 exit status
make: *** [src/main.o] Error 1
The content of my main.cpp:
#include <iostream>
#include "renderwindow.h"
int main() {
RenderWindow *renderWindow = RenderWindow::getInstance();
renderWindow->init("OpenGL Framework", 640, 480);
renderWindow->show();
renderWindow->shutdown();
}
My OS is Mac OS X 10.9 and I'm using GLEW, GLFW and GLM.
Would you have any idea why I got those errors ?
Thanks in advance !