Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. International
  3. Portuguese
  4. Problema ao compilar plugin do Qt Creator
Forum Updated to NodeBB v4.3 + New Features

Problema ao compilar plugin do Qt Creator

Scheduled Pinned Locked Moved Portuguese
17 Posts 3 Posters 9.2k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • R Offline
    R Offline
    Rodrigocg
    wrote on last edited by
    #7

    Segue o conteudo do arquivo .pro:

    @
    TARGET = MyPlugin
    TEMPLATE = lib

    DEFINES += MYPLUGIN_LIBRARY

    MyPlugin files

    SOURCES += mypluginplugin.cpp

    HEADERS += mypluginplugin.h
    myplugin_global.h
    mypluginconstants.h

    Qt Creator linking

    set the QTC_SOURCE environment variable to override the setting here

    QTCREATOR_SOURCES = $$(QTC_SOURCE)
    isEmpty(QTCREATOR_SOURCES):QTCREATOR_SOURCES=D:/Qt/qtcreator-2.7.0

    set the QTC_BUILD environment variable to override the setting here

    IDE_BUILD_TREE = $$(QTC_BUILD)
    isEmpty(IDE_BUILD_TREE):IDE_BUILD_TREE=D:/Qt/build-qtcreator-Qt_4_8_4-Release/lib

    uncomment to build plugin into user config directory

    <localappdata>/plugins/<ideversion>

    where <localappdata> is e.g.

    "%LOCALAPPDATA%\QtProject\qtcreator" on Windows Vista and later

    "$XDG_DATA_HOME/data/QtProject/qtcreator" or "~/.local/share/data/QtProject/qtcreator" on Linux

    "~/Library/Application Support/QtProject/Qt Creator" on Mac

    USE_USER_DESTDIR = yes

    PROVIDER = MyCompany

    include($$QTCREATOR_SOURCES/src/qtcreatorplugin.pri)
    include($$QTCREATOR_SOURCES/src/plugins/coreplugin/coreplugin.pri)

    LIBS += -L$$IDE_PLUGIN_PATH/QtProject
    @

    estou testeando o que voce sugeriu TioRoy...

    daqui a pouco posto o resultado

    1 Reply Last reply
    0
    • R Offline
      R Offline
      Rodrigocg
      wrote on last edited by
      #8

      TioRoy,

      a saida foram os seguintes arquivos:

      mypluginplugin.o
      qtcreator_gui_pch.h.gch/c++
      ../MyPlugin.pluginspec

      eu mudei a linha @IDE_BUILD_TREE = $$(QTC_BUILD)
      isEmpty(IDE_BUILD_TREE):IDE_BUILD_TREE=D:/Qt/build-qtcreator-Qt_4_8_4-Release/lib@ do arquivo .pro para:
      @## set the QTC_BUILD environment variable to override the setting here
      IDE_BUILD_TREE = $$(QTC_BUILD)
      isEmpty(IDE_BUILD_TREE):IDE_BUILD_TREE=C:\Users\Rodrigo\Documents\QTprojetos\untitled\build\Qt_4_8_4-Release@

      o conteudo do arquivo MyPlugin.pluginspec é:

      @<plugin name="MyPlugin" version="0.0.1" compatVersion="0.0.1">
      <vendor>MyCompany</vendor>
      <copyright>(C) MyCompany</copyright>
      <license>Put your license text here</license>
      <description>Put a short description of your plugin here</description>
      <url>http://www.mycompany.com</url>
      <dependencyList>
      <dependency name="Core" version="2.7.0"/>
      </dependencyList>
      </plugin>

      @

      1 Reply Last reply
      0
      • T Offline
        T Offline
        TioRoy
        wrote on last edited by
        #9

        Rodrigo,

        Fiz o teste aqui e realmente, só criar o projeto do plugin, sem o QtCreator compilado, não funciona.

        Você precisa compilar o QtCreator (abra o qtcreator.pro que está nos fontes do creator). Ele vai compilar para um diretório (que você pode configurar se quiser).

        Depois de compilado, você vai no seu .pro, e coloca o mesmo diretório na variável IDE_BUILD_TREE.

        1 Reply Last reply
        0
        • R Offline
          R Offline
          Rodrigocg
          wrote on last edited by
          #10

          vou testar aqui... e ja posto o resultado!

          1 Reply Last reply
          0
          • R Offline
            R Offline
            Rodrigocg
            wrote on last edited by
            #11

            Não entendo o que esta acontecendo...

            Formatei o computador e coloquei o windows 8...

            compilei o Qt Creator com o Qt 5.0.2 (MingW32_4.7)

            Os erros de dependencia continuam, mas com menos dependencias agora...

            segue os erros:

            d:/qt/qt5.0.2/tools/mingw/bin/../lib/gcc/i686-w64-mingw32/4.7.2/../../../../i686-w64-mingw32/bin/ld.exe: cannot find -lUtils
            d:/qt/qt5.0.2/tools/mingw/bin/../lib/gcc/i686-w64-mingw32/4.7.2/../../../../i686-w64-mingw32/bin/ld.exe: cannot find -lCore
            collect2.exe: error: ld returned 1 exit status

            ja verifiquei as dependencias com o Dependency Walker e esta tudo ok...

            1 Reply Last reply
            0
            • T Offline
              T Offline
              TioRoy
              wrote on last edited by
              #12

              Bom, testei com o compilador do Visual Studio (2010). E estou usando também o Qt 5.0.2.

              Vou fazer a compilação usando o mingw amanhã e te digo o resultado.

              1 Reply Last reply
              0
              • R Offline
                R Offline
                Rodrigocg
                wrote on last edited by
                #13

                Ok! Aguardo o resultado... enquanto isso vou testar usando o visual studio...

                1 Reply Last reply
                0
                • T Offline
                  T Offline
                  TioRoy
                  wrote on last edited by
                  #14

                  Rodrigo,

                  ainda não consegui testar.... você conseguiu testar com o Visual Studio?

                  1 Reply Last reply
                  0
                  • R Offline
                    R Offline
                    Rodrigocg
                    wrote on last edited by
                    #15

                    nada ainda.... queria fazer um plugin para auxiliar na criaçao das classes... pecisava de uma soluçao pra isso.. instalei o visual studio aqui, mas nao estou conseguindo configurar ele no Qt Creator... fica dando erro de compilador...

                    1 Reply Last reply
                    0
                    • T Offline
                      T Offline
                      TioRoy
                      wrote on last edited by
                      #16

                      Eita.... piorou a situação :)

                      Vou fazer o teste do mingw amanhã sem falta.

                      1 Reply Last reply
                      0
                      • T Offline
                        T Offline
                        TioRoy
                        wrote on last edited by
                        #17

                        rodrigocg,

                        Instalei o Qt 5.0.2 (mingw - windows).

                        Fui testar, e me deparei com um erro, quando tentei compilar primeiro o QtCreator:

                        Project ERROR: Unknown module(s) in QT: quick1
                        19:44:52: The process "C:\Qt\Qt5.0.2\5.0.2\mingw47_32\bin\qmake.exe" exited with code 3.
                        Error while building/deploying project qtcreator (kit: Desktop Qt 5.0.2 MinGW 32bit)

                        Vou investigar o motivo....

                        1 Reply Last reply
                        0

                        • Login

                        • Login or register to search.
                        • First post
                          Last post
                        0
                        • Categories
                        • Recent
                        • Tags
                        • Popular
                        • Users
                        • Groups
                        • Search
                        • Get Qt Extensions
                        • Unsolved