preventing inline/dllimport warnings?

Angus Leeming leeming at
Tue Jan 18 20:36:49 CET 2005

Compiling lyx with "g++ -W -Wall", I get vast numbers of warning messages
when compiling the Qt frontend about things like:

J:/MinSYS/home/angus/qt3/include/private/qucom_p.h:413: warning: inline
function 'virtual void QUType_double::clear(QUObject*)' is declared as
dllimport: attribute ignored.

struct Q_EXPORT QUType_double : public QUType
    void clear( QUObject * ) {}

Is there a way to silence these warnings other than by moving the
definition out of line? I've googled and find lots of mention of the
message but no resolutions. Maybe you guys have some ideas?

FWIW, I see that a request has been posted to the gcc bugzilla to add the
ability to disable these inline/dllimport warnings

But at the moment there appears to be no way to silence the specific
warning. The g++ source code reads:
    else if (TREE_CODE (decl) == FUNCTION_DECL && DECL_INLINE (decl))
        if (extra_warnings)
            warning_with_decl (decl, "inline function '%s' is declared 
                               as dllimport: attribute ignored.");
           return 0;


More information about the kde-cygwin mailing list