Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Installation and Deployment
  4. [solved] QT creator 2.4.1 - Errors whens compiling examples
Forum Updated to NodeBB v4.3 + New Features

[solved] QT creator 2.4.1 - Errors whens compiling examples

Scheduled Pinned Locked Moved Installation and Deployment
11 Posts 6 Posters 9.6k 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.
  • M Offline
    M Offline
    maissiou23
    wrote on last edited by
    #1

    I don't know If it's the right place to post on compilation errors. I tried to run some examples in the QT demos and am getting LNK1104.

    With Affline Transformations demo, I get:

    link \LIBPATH:"..\shared\debug" \LIBPATH:"c:\QtSDK\Desktop\Qt\4.8.0\msvc2010\lib" \NOLOGO \DYNAMICBASE \NXCOMPAT \DEBUG \MANIFEST \MANIFESTFILE:"debug\affine.intermediate.manifest" \SUBSYSTEM:WINDOWS "\MANIFESTDEPENDENCY:type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' publicKeyToken='6595b64144ccf1df' language='' processorArchitecture=''" LINK:-1: erreur : LNK1104: cannot open file 'demo_shared.lib'

    and with: Plug & Paint Example, I get:

    :-1: erreur : LNK1104: cannot open file 'pnp_basictoolsd.lib'

    Did anyone got this problem solved please?

    thanks,
    Maissiou23

    1 Reply Last reply
    0
    • B Offline
      B Offline
      Blizzard
      wrote on last edited by
      #2

      There is an error in the provided .pro file. Edit plugandpaint.pro and add the plugins/ directory as a library path so that the line now reads:

      LIBS = -L../tools/plugandpaintplugins/basictools -L plugins/ -lpnp_basictools

      Software Engineer | Aerospace & Defence

      1 Reply Last reply
      0
      • M Offline
        M Offline
        maissiou23
        wrote on last edited by
        #3

        Thank you Blizzard,

        actually the Libs line was:
        LIBS = -L$${QT_BUILD_TREE}/examples/tools/plugandpaint/plugins -lpnp_basictools

        and the actual path to "basictools" folder is:
        C:\QtSDK\Examples\4.7\tools\plugandpaintplugins\basictools

        I tried:
        LIBS = -L$${QT_BUILD_TREE}/examples/tools/plugandpaintplugins/basictools -L plugins/ -lpnp_basictools

        but now am getting another error:

        main.obj:-1: error: LNK2019: unresolved external symbol "class QObject * __cdecl qt_plugin_instance_pnp_basictools(void)" (?qt_plugin_instance_pnp_basictools@@YAPAVQObject@@XZ) referenced in function "public: __thiscall Staticpnp_basictoolsPluginInstance::Staticpnp_basictoolsPluginInstance(void)" (??0Staticpnp_basictoolsPluginInstance@@QAE@XZ)

        debug\plugandpaint.exe:-1: error: LNK1120: 1 unresolved externals

        could you point me out further please?

        1 Reply Last reply
        0
        • B Offline
          B Offline
          Blizzard
          wrote on last edited by
          #4

          This error usually means that you are missing the main() function, or that the compiler is expecting a different main() function. Also, you may be running it as the wrong project type in your IDE (if you are using one). How do you build the example?

          Software Engineer | Aerospace & Defence

          1 Reply Last reply
          0
          • M Offline
            M Offline
            maissiou23
            wrote on last edited by
            #5

            I get passed the last error suprisingly by removing this line in the shared.pri file:
            @#!hpuxi-acc*:!hpux-acc*:!symbian:LIBS += -ldemo_shared@

            but now am getting:

            @:-1: error: undefined reference to `ArthurStyle::ArthurStyle()'@

            even with the include: @#include "arthurstyle.h"@

            any suggestions?

            thanks again.

            1 Reply Last reply
            0
            • M Offline
              M Offline
              mlong
              wrote on last edited by
              #6

              Are arthurstyle.cpp and arthurstyle.h included in your SOURCES and HEADERS sections in your .pro file?

              Software Engineer
              My views and opinions do not necessarily reflect those of anyone -- living or dead, real or fictional -- in this universe or any other similar multiverse node. Void where prohibited. Your mileage may vary. Caveat emptor.

              1 Reply Last reply
              0
              • M Offline
                M Offline
                maissiou23
                wrote on last edited by
                #7

                I tried to add arthurstyle to the project file and still the same error.

                If the example code (Affine Transformations from QT examples) is working for you guys, should I simply reinstall QT as the problem come from the QT example? ... am using the windows version of QT by the way

                1 Reply Last reply
                0
                • S Offline
                  S Offline
                  solotim
                  wrote on last edited by
                  #8

                  A simple workaround is to copy

                  QtSDK\Examples\4.7\tools\plugandpaint\plugins\pnp_basictoolsd.lib

                  to upper directory. (QtSDK\Examples\4.7\tools\plugandpaint)

                  1 Reply Last reply
                  0
                  • M Offline
                    M Offline
                    maissiou23
                    wrote on last edited by
                    #9

                    Thank you, the problem have been fixed with the last releases of Qt 5.

                    1 Reply Last reply
                    1
                    • H Offline
                      H Offline
                      hardcodes.de
                      wrote on last edited by
                      #10

                      Could you please prepend a [solved] to the title of this thread? Thank you :-)

                      while(!sleep){++sheep;}

                      1 Reply Last reply
                      0
                      • F Offline
                        F Offline
                        Finaren
                        wrote on last edited by
                        #11

                        might be too late to help. I installed qt5 and the run the new affine example.

                        [quote author="hardcodes.de" date="1367062871"]Could you please prepend a [solved] to the title of this thread? Thank you :-)[/quote]

                        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