Hi,

I have the following codes:
Qt Code:
  1. #include <QVector>
  2.  
  3. template <typename Type>
  4. class MyVector : public QVector<Type>
  5. {
  6. ,,,
  7. };
  8.  
  9. template class IMPORT_EXPORT MyVector<float>;
  10. typedef MyVector<float> MyFloatVector;
To copy to clipboard, switch view to plain text mode 

The above code is built into a dll library, with IMPORT_EXPORT properly defined.

Then I have another dll using QVector<float> directly, such as
Qt Code:
  1. #include <QVector>
  2.  
  3. class AnotherClass
  4. {
  5. public:
  6.  
  7. QVector<float> foo() const {
  8. return QVector<float>();
  9. }
  10.  
  11. }
To copy to clipboard, switch view to plain text mode 

When linking them together, I got QVector<float>::QVector<float> already defined error. This only happens on Windows. Linux is fine.

Can someone tell me what is the problem?

Many thanks.