C.3.1.  Common Linker Error Messages

[ fromfile: linker.xml id: commonlinkererrors ]

Error: Unable to find libxxx.so.x

Error: undefined reference to identifier

Error: Unresolved External Symbol

When linking against your own library, from a Microsoft compiler, you might find a linker error like this:

customer.obj : error LNK2001: unresolved external symbol
"public: virtual bool __thiscall DataObject::readFrom(class QObject const &)"
(?readFrom@DataObject@@UAE_NABVQObject@@@Z)

This often means that the symbol was not exported when the DLL was built. Be sure that there is a Q_DECL_EXPORT macro for the library before the class or function declaration, and rebuild the DLL. See Section 7.1.2.

Error: Undefined reference to vtable for ClassName

[Tip]Tip

After this kind of linker error, check first that all files are listed properly in the project file, all QObjects have a proper Q_OBJECT macro, do a "qmake && make clean", and see if you can reproduce the error.



[92] A class with at least one virtual method is polymorphic.