Hi,

I'm having some trouble with libraries. I am having an undefined reference.
C:file:-1: error: undefined reference to `_imp___ZTV13OrderStrategy'
C:file:-1: error: release/LibraryB.o: bad reloc address 0x1 in section `.text$_ZN13LibraryBD1Ev[__ZN13LibraryByD1Ev]'


Library A is compliled and located in its own release folder.
Library B implements an interface from library A.


Which header need i to use as header for the base of InterfaceAImp?
I have chosen for Library A - > InterfaceA.h with an unified LIBRARYA_LIBRARY. So the header will be class Q_DECL_IMPORT InterfaceA. somthing is going wrong but I dont know what.

Any help is appreciated,
Delphi

Library A class:
Qt Code:
  1. #if defined(LIBRARYA_LIBRARY)
  2. # define INTERFACESHARED_EXPORT Q_DECL_EXPORT
  3. #else
  4. # define INTERFACESHARED_EXPORT Q_DECL_IMPORT
  5. #endif
  6.  
  7. class INTERFACESHARED_EXPORT InterfaceA
  8. {
  9.  
  10. public:
  11. virtual ~InterfaceA(){}
  12. virtual QString* run() =0;
  13. };
To copy to clipboard, switch view to plain text mode 

Library B *.pro
Qt Code:
  1. QT -= gui
  2.  
  3. TARGET = Implementation
  4. TEMPLATE = lib
  5.  
  6. DEFINES += IMPLEMENTATION_LIBRARY
  7.  
  8. DEPENDPATH += . ../LibraryA
  9. INCLUDEPATH += ../LibraryA
  10. LIBS+= -L../LibraryA/release -lLibraryA
To copy to clipboard, switch view to plain text mode 

library B class

Qt Code:
  1. #if defined(LIBRARYB_LIBRARY)
  2. # define IMPLEMENTATIONSHARED_EXPORT Q_DECL_EXPORT
  3. #else
  4. # define IMPLEMENTATIONSHARED_EXPORT Q_DECL_IMPORT
  5. #endif
  6.  
  7. #include "InterfaceA" // header file from Library A, dir: ../LibraryA
  8. class IMPLEMENTATIONSHARED_EXPORT InterfaceAImp : public InterfaceA
  9. {
  10.  
  11. public:
  12. InterfaceAImp
  13. virtual ~InterfaceAImp(){}
  14. virtual QString* run(){return "Hello world";}
  15. };
To copy to clipboard, switch view to plain text mode