hvengel
19th February 2008, 01:00
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?
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?