Hi guys,
I have a class declared and defined in AliHLTMessageQu eue.h and AliHLTMessageQu eue.cxx respectively
template<typena me MessageType, int kSignalNumber = SIGUSR1>
class AliHLTMessageQu eue{.//declarations etc..}
I also have a file queueTest.cxx where i call AliHLTMessageQu eue methods.
I declare my object like as:
AliHLTMessageQu eue<int> queue(20000000) ;
And I made this call somewhere in queueTest.cxx:
queue.Push(m, COUNT,true,0,tr ue);
I compile my files with Makefile and this is the line in the make file:
g++ -O3 -Wall -Werror -DNDEBUG -pthread $(CXXFlags) AliHLTMessageQu eue.cxx queueTest.cxx -o $@
I get the error:
undefined reference to`AliHLTMessag eQueue<int, 10>::Push(int const*, unsigned, int, bool, float, bool)'
I DON'T UNDERSTAND THIS BECAUSE I INCLUDE THE SOURCE FILE WHERE I DEFINED THE METHOD Push WHILE COMPILING. Any suggestions?
I have a class declared and defined in AliHLTMessageQu eue.h and AliHLTMessageQu eue.cxx respectively
template<typena me MessageType, int kSignalNumber = SIGUSR1>
class AliHLTMessageQu eue{.//declarations etc..}
I also have a file queueTest.cxx where i call AliHLTMessageQu eue methods.
I declare my object like as:
AliHLTMessageQu eue<int> queue(20000000) ;
And I made this call somewhere in queueTest.cxx:
queue.Push(m, COUNT,true,0,tr ue);
I compile my files with Makefile and this is the line in the make file:
g++ -O3 -Wall -Werror -DNDEBUG -pthread $(CXXFlags) AliHLTMessageQu eue.cxx queueTest.cxx -o $@
I get the error:
undefined reference to`AliHLTMessag eQueue<int, 10>::Push(int const*, unsigned, int, bool, float, bool)'
I DON'T UNDERSTAND THIS BECAUSE I INCLUDE THE SOURCE FILE WHERE I DEFINED THE METHOD Push WHILE COMPILING. Any suggestions?
Comment