Results 1 to 4 of 4

Thread: error definition of static member '...' of dllimport class

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Mar 2006
    Posts
    74
    Thanks
    1
    Qt products
    Qt3
    Platforms
    MacOS X Unix/X11 Windows

    Default error definition of static member '...' of dllimport class

    I have ported my app to Qt4 and I am in the process of testing my build on Windows (I primarily work on Linux) and I am receiving errors that look like this:

    build\win32\libqtlcmswidgets\moc_lprofgauge.cc:81: error: definition of static data member 'LProfGauge::staticMetaObject' of dllimport'd class
    As you can see it is complaining about something in a moc file being declared as - well I am not sure what this means. The object is question is a custom widget that is in a static library (not in a DLL) and it appears that moc is generating incorrect code that the compiler is chocking on.

    This same static library contains other custom widgets (6 in total) and all of the hand written code for the custom widgets it compiling without any error messages. But the build fails when it tries to build the first moc generated code.

    I am using MinGW. I have found a few other threads that that touch on this type of error message but in every case it was someone asking how to get a specific application or library to build and being told by the author of that app or library to set something that was very specific to that app or library. So that info was not very helpful for me to understand what this is about and how to fix it. So could someone here point me to a source that explains in general what is causing this error and perhaps how to fix it?
    Last edited by jacek; 19th February 2008 at 01:03. Reason: changed [code] to [quote]

Similar Threads

  1. Replies: 16
    Last Post: 23rd May 2008, 10:12
  2. static member initialization
    By high_flyer in forum General Programming
    Replies: 2
    Last Post: 17th September 2007, 21:22
  3. Replies: 2
    Last Post: 16th March 2007, 09:04
  4. Accessing to a static variable from the same class
    By xgoan in forum General Programming
    Replies: 6
    Last Post: 5th March 2007, 10:50

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Qt is a trademark of The Qt Company.