how is your code set up?
this would be the optimal way to set it up:
matrix3.h
Code:
template<typename T>
class matrix3
{ ...
friend vector3<T> operator * (const matrix3<T>& a, const vector3<T>& v);
...
};
matrix3.cpp
Code:
#include "matrix3.h"
template<typename T>
vector3<T> operator * (const matrix3<T>& a, const vector3<T>& b)
{
// do stuff,
return vector3<T>(foo,bar,gah);
}
otherfile.cpp
Code:
#include "matrix3.h"
void otherFunc() // in another file
{
vector3f foo = someMatrix * someVector;
}
if it isn't like that, then do it like that, and it should work