My environment:
- Qt Creator 2.3.1
- Qt 4.7.4 (32 bit)
- Windows 7 Ultimate (64 bit)
While trying to rebuild a project in Qt for Windows, I’m having the following compiler warning:
warning: auto-importing has been activated without
–enable-auto-import specified on the command line. This should work unless it involves constant data structures referencing symbols from
auto-imported DLLs.
The project that’s emitting this warning includes a DLL file. In spite of the warning, the classes and functions in the DLL are accessible.
What does the warning mean? How to fix it?
This is a MingW specific warning telling you that several dynamic libraries are being linked in implicitly. That’s entirely fine. To fix it, you literally do what the warning tells you and specify the option:
(By the way, if you’re distributing executables for Windows, you might additionally like to link with
-static-libgccand-static-libstdc++to avoid dependence on the compiler’s runtime libraries.)