I am trying to build an Ogre program for which I am writing a Makefile. However, whan attempting to make the program, I get the following error:
...
GraphicsSystem.cpp:(.text+0x3a9b): undefined reference to `Ogre::Quaternion::IDENTITY'
GraphicsSystem.cpp:(.text+0x3aa2): undefined reference to `Ogre::Vector3::ZERO'
GraphicsSystem.cpp:(.text+0x3ad5): undefined reference to `Ogre::Node::setPosition(float, float, float)'
GraphicsSystem.cpp:(.text+0x3b60): undefined reference to `Ogre::MovableObject::detachFromParent()'
GraphicsSystem.cpp:(.text+0x3b7a): undefined reference to `Ogre::SceneNode::attachObject(Ogre::MovableObject*)'
GraphicsSystem.cpp:(.text+0x3bac): undefined reference to `Ogre::Camera::setPosition(Ogre::Vector3 const&)'
GraphicsSystem.cpp:(.text+0x3c22): undefined reference to `Ogre::Camera::setAutoAspectRatio(bool)'
...
collect2: error: ld returned 1 exit status
Makefile:6: recipe for target 'all' failed
make: *** [all] Error 1
My Makefile is the following:
CXX = g++-5
CXXFLAGS = -std=c++11 -Wno-unknown-pragmas
INCLUDES = -lsfml-graphics -lsfml-audio -lsfml-window -lsfml-system -L/home/me/ogre_install/lib/OGRE/ -I/home/me/ogre_install/include/OGRE/ -L/home/me/ogre_install/lib/ -I/home/me/ogre_install/include/ -lOgreMain -lOgreOverlay -lOgreHlmsPbs -lOgreHlmsUnlit
all:
$(CXX) $(CXXFLAGS) $(INCLUDES) -o bin/a.out src/*
Even though I specified all the libraries, I still get messages mentioning undefined references. Anyone have any idea?