I have this error:
Undefined symbols for architecture x86_64:
"my::Queue<int>::Queue()", referenced from:
_main in ccdwI88X.o
ld: symbol(s) not found for architecture x86_64
collect2: ld returned 1 exit status
for this code 'main.cpp':
#include "Queue.hpp"
int main()
{
my::Queue<int> myqueue;
return 0;
}
'Queue.hpp':
#ifndef QUEUE_HH__
#define QUEUE_HH__
namespace my
{
template <typename T>
class Queue
{
public:
Queue();
};
}
#endif
and 'Queue.cpp':
#include "Queue.hpp"
template <typename T>
my::Queue<T>::Queue()
{
}