Results 1 to 9 of 9

Thread: AnalogClock::staticMetaObject': definition of dllimport static data member not allowe

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #3
    Join Date
    Apr 2010
    Location
    Italia
    Posts
    149
    Thanked 2 Times in 2 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: AnalogClock::staticMetaObject': definition of dllimport static data member not al

    d_stranz
    No, the test project (like the plugin itself) are Release. I am attaching the .pro file of the test:
    Qt Code:
    1. QT += core gui
    2.  
    3. greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
    4.  
    5. CONFIG += c++17
    6.  
    7. # You can make your code fail to compile if it uses deprecated APIs.
    8. # In order to do so, uncomment the following line.
    9. #DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0
    10.  
    11. SOURCES += \
    12. main.cpp \
    13. widget.cpp
    14.  
    15. HEADERS += \
    16. widget.h \
    17. analogclock.h
    18.  
    19. FORMS += \
    20. widget.ui
    To copy to clipboard, switch view to plain text mode 
    If it can be useful, I also put the .pro of the plugin:
    Qt Code:
    1. QT += widgets uiplugin
    2.  
    3. QTDIR_build {
    4. # This is only for the Qt build. Do not use externally. We mean it.
    5. PLUGIN_TYPE = designer
    6. PLUGIN_CLASS_NAME = AnalogClockPlugin
    7. load(qt_plugin)
    8. CONFIG += install_ok
    9. } else {
    10. # Public example:
    11.  
    12. CONFIG += plugin
    13. TEMPLATE = lib
    14.  
    15. TARGET = $$qtLibraryTarget($$TARGET)
    16.  
    17. target.path = $$[QT_INSTALL_PLUGINS]/designer
    18. INSTALLS += target
    19. }
    20.  
    21. HEADERS = analogclock.h \
    22. customwidgetplugin.h
    23.  
    24. SOURCES = analogclock.cpp \
    25. customwidgetplugin.cpp
    To copy to clipboard, switch view to plain text mode 

    Where do I find the reference of dllimport in Qt code ? Please note that here I'm doing everything only in Qt environment, including IDE, for the moment I don't use Visual Studio C++ (here the same plugin project works fine, including the test program).
    I want to be able to make everything work in Qt environment, so I can finally verify the old QLed problem that you will remember well :-))
    Last edited by giorgik; 20th May 2023 at 18:27. Reason: updated contents

Similar Threads

  1. Replies: 3
    Last Post: 21st November 2017, 11:48
  2. Replies: 2
    Last Post: 10th October 2014, 09:49
  3. Replies: 2
    Last Post: 20th October 2011, 15:14
  4. Replies: 22
    Last Post: 8th October 2008, 13:54
  5. Replies: 3
    Last Post: 19th February 2008, 13:10

Tags for this Thread

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
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.