跳到內容
  • 版面
  • 最新
  • 標籤
  • 熱門
  • 使用者
  • 群組
  • 搜尋
  • Get Qt Extensions
  • Unsolved
Collapse
品牌標誌
  1. 首頁
  2. Qt Development
  3. General and Desktop
  4. Emoji support
Forum Updated to NodeBB v4.3 + New Features

Emoji support

已排程 已置頂 已鎖定 已移動 Unsolved General and Desktop
21 貼文 6 Posters 17.6k 瀏覽 4 Watching
  • 從舊到新
  • 從新到舊
  • 最多點贊
回覆
  • 在新貼文中回覆
登入後回覆
此主題已被刪除。只有擁有主題管理權限的使用者可以查看。
  • P Pedro Vicente

    @Pedro-Vicente This is my Cmake script

    cmake_minimum_required(VERSION 3.16)
    project(qrwemoticons VERSION 1.0.0 LANGUAGES CXX)
    set(CMAKE_CXX_STANDARD 17)
    set(CMAKE_CXX_STANDARD_REQUIRED ON)
    
    set(CMAKE_INCLUDE_CURRENT_DIR ON)
    set(CMAKE_AUTOMOC ON)
    
    if(MSVC)
     set (CMAKE_PREFIX_PATH "C:\\qt_install")
    endif()
    
    find_package(Qt6 REQUIRED COMPONENTS Widgets)
    find_package(Qt6 REQUIRED COMPONENTS Svg)
    find_package(Qt6 REQUIRED COMPONENTS Xml)
    qt_standard_project_setup()
    
    add_definitions(-DQRWEMOTICONS_LIB)
    
    add_executable(qrwemoticons
    src/QrwEmoticons.cpp 
    src/QrwEmoticons_p.cpp 
    src/QrwEmoticons_data.cpp 
    src/TextEdit.cpp 
    src/QrwEmoticonsTextObjectInterface.cpp
    include/QrwEmoticons/Global.h 
    include/QrwEmoticons/QrwEmoticonsPlugin.h 
    include/QrwEmoticons/QrwEmoticons.h 
    include/QrwEmoticons/TextEdit.h 
    src/QrwEmoticons_p.h 
    src/QrwEmoticonsTextObjectInterface_p.h
    example-app/src/MainWindow.cpp
    example-app/src/MainWindow.h
    example-app/main.cpp)
    
    include_directories(include)
    include_directories(example-app/src)
    
    target_link_libraries(qrwemoticons PRIVATE Qt6::Widgets)
    target_link_libraries(qrwemoticons PRIVATE Qt6::Svg)
    target_link_libraries(qrwemoticons PRIVATE Qt6::Xml)
    set_target_properties(qrwemoticons PROPERTIES WIN32_EXECUTABLE ON MACOSX_BUNDLE ON)
    
    #plugins
    #The json file must reside in one of the include directories specified by the build-system. moc exits 
    #with an error when it could not find the specified file.
    include_directories(plugin-twitter)
    include_directories(shared/src)
    
    add_library(plugin-twitter SHARED 
    shared/src/QrwEmoticonsHelper.cpp
    shared/src/QrwEmoticonsHelper.h
    plugin-twitter/src/plugin.cpp
    plugin-twitter/src/plugin.h)
    target_link_libraries(plugin-twitter PRIVATE Qt6::Widgets)
    target_link_libraries(plugin-twitter PRIVATE Qt6::Svg)
    target_link_libraries(plugin-twitter PRIVATE Qt6::Xml)
    
    P 離線
    P 離線
    Pedro Vicente
    寫於 最後由 編輯
    #21

    @Pedro-Vicente But using that script, gives a link error

    mocs_compilation_Debug.obj : error LNK2001: unresolved external symbol "public: static struct QMetaObject const QrwEmoticons::staticMetaObject"
    
    1 條回覆 最後回覆
    0

    • 登入

    • Login or register to search.
    • 第一個貼文
      最後的貼文
    0
    • 版面
    • 最新
    • 標籤
    • 熱門
    • 使用者
    • 群組
    • 搜尋
    • Get Qt Extensions
    • Unsolved