Linker error with ofAppGlutWindow



I am trying to make the graphics in my sketch smoother as per the method detailed here, but I get the following errors. I pasted my main.cpp underneath. I have the ofAppGlutWindow.h in openFrameworks/app, so that’s not the problem.

Undefined symbols for architecture x86_64:
  "ofAppGlutWindow::ofAppGlutWindow()", referenced from:
      _main in main.o
  "ofAppGlutWindow::loop()", referenced from:
      void ofMainLoop::addWindow<ofAppGlutWindow>(std::__1::shared_ptr<ofAppGlutWindow>) in main.o
  "ofAppGlutWindow::setGlutDisplayString(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >)", referenced from:
      _main in main.o
  "vtable for ofAppGlutWindow", referenced from:
      _main in main.o
  NOTE: a missing vtable usually means the first non-inline virtual member function has no definition.
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

my main.cpp:

#include "ofMain.h"
#include "ofApp.h"
#include "ofAppGlutWindow.h"

int main( )
    ofAppGlutWindow window;
    window.setGlutDisplayString( "rgba double samples>=4" );
	ofSetupOpenGL( &window, 640,640,OF_WINDOW );
	ofRunApp( new ofApp() );

This main file looks old. ofAppGlutWindow is not needed anymore.


#include "ofApp.h"
#include "ofMain.h"

int main( ){
	ofSetupOpenGL(640,480, OF_WINDOW);
	ofRunApp(new ofApp());


That’s exactly what I have normally. Just thought adding ofAppGlutWindow would help. Thanks for the response, good to know I don’t need to bother with trying to fix this error anymore, since ofAppGlutWindow is not needed anymore.