I'm getting unresolved external symbols when using classes which are apart of a namespace (located in a separate folder).
This is a stripped down version main class i've written thats apart of its own VS2010 project.
main.cpp
#include <Engine/input.h>
#include <Engine/graphics.h>
#include <Engine/sound.h>
using namespace Engine;
int main()
{
InputManager* input = new InputManager();
input->initialise();
etc.
}It is including classes which are in a different folder and defined like so...
#ifndef INPUTMGR_H
#define INPUTMGR_H
namespace Engine
{
class InputManager
{
void initialize();
// rest of functions
};
}
#endifand the cpp would be like..
#include "InputManager.h"
namespace Engine
{
void InputManager::initialise()
{
// setup keyboard and mouse etc
}
}I'm getting unresolved external errors to the functions that i call such as initialise(). Now i have told visual studio to look for source and include directories to this folder (because i can include and compile them so it works) but i'm still getting these errors. I should also add that putting the source code in the same folder as main.cpp works fine, but i'd like to not do this because that means each test program will have a dated copy of the engine (That is still currently in progress).
Any one got any ides or a better solution to what i'm trying to achieve?
Much appreciated,
- rocklobster






