Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. [Solved] QtSerialPort building problem
Forum Updated to NodeBB v4.3 + New Features

[Solved] QtSerialPort building problem

Scheduled Pinned Locked Moved General and Desktop
25 Posts 3 Posters 24.3k 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.
  • P Offline
    P Offline
    paul_peter
    wrote on last edited by
    #3

    [quote author="kuzulis" date="1354105305"]bq. There i found the serialport.pro

    Need qtserialport.pro in root directory[/quote]

    In this case the compilation process aborts with:
    @C:\Users\N\Downloads\serialport-build-release>qmake ..\qtserialport\qtserialport.pro CONFIG+=release
    C:\Users\N\Downloads\serialport-build-release>mingw32-make
    cd src/ && c:/QtSDK/Desktop/Qt/4.8.1/mingw/bin/qmake.exe c:/Users/N/Downloads/qtserialport/src/src.pro CONFIG+=release -o Makefile
    cd src/ && mingw32-make -f Makefile
    mingw32-make[1]: Entering directory c:/Users/N/Downloads/serialport-build-release/src' cd serialport/ && c:/QtSDK/Desktop/Qt/4.8.1/mingw/bin/qmake.exe c:/Users/N/Downloads/qtserialport/src/serialport/serialport.pro CONFIG+=release -o Makefile Syntaxerror. cp: cannot create regular file C:/Users/N/Downloads/serialport-build-release/include/QtAddOnSerialPort': No such file or directory
    cp: cannot create regular file C:/Users/N/Downloads/serialport-build-release/include/QtAddOnSerialPort': No such file or directory cp: cannot create regular file C:/Users/N/Downloads/serialport-build-release/include/QtAddOnSerialPort': No such file or directory
    Syntaxerror.
    cp: cannot create regular file C:/Users/N/Downloads/serialport-build-release/include/QtAddOnSerialPort': No such file or directory cp: cannot create regular file C:/Users/N/Downloads/serialport-build-release/include/QtAddOnSerialPort': No such file or directory
    cp: cannot create regular file C:/Users/N/Downloads/serialport-build-release/include/QtAddOnSerialPort': No such file or directory Syntaxerror. cp: cannot create regular file C:/Users/N/Downloads/serialport-build-release/include/QtAddOnSerialPort': No such file or directory
    cp: cannot create regular file C:/Users/N/Downloads/serialport-build-release/include/QtAddOnSerialPort': No such file or directory cp: cannot create regular file C:/Users/N/Downloads/serialport-build-release/include/QtAddOnSerialPort': No such file or directory
    cd serialport/ && c:/QtSDK/mingw/bin/mingw32-make -f Makefile
    /usr/bin/sh: c:/QtSDK/mingw/bin/mingw32-make: Invalid argument
    mingw32-make[1]: *** [sub-serialport-make_default] Error 126
    mingw32-make[1]: Leaving directory `c:/Users/N/Downloads/serialport-build-release/src'
    mingw32-make: *** [sub-src-make_default-ordered] Error 2@

    1 Reply Last reply
    0
    • K Offline
      K Offline
      kuzulis
      Qt Champions 2020
      wrote on last edited by
      #4

      Perhaps you need clear and delete all previous trash from your release dir (after previous building), and trash from paths

      "c:/QtSDK/Desktop/Qt/4.8.1/mingw/include/QtAddOnSerialPort/"

      "c:/QtSDK/Desktop/Qt/4.8.1/mingw/bin/SerialPortd1.dll"
      "c:/QtSDK/Desktop/Qt/4.8.1/mingw/lib/SerialPortd.prl"
      "c:/QtSDK/Desktop/Qt/4.8.1/mingw/lib/libSerialPortd1.a"
      "c:/QtSDK/Desktop/Qt/4.8.1/mingw/lib/SerialPortd1.dll"

      and

      "c:/QtSDK/Desktop/Qt/4.8.1/mingw/mkspecs/features/"

      and try rebuild again.

      1 Reply Last reply
      0
      • P Offline
        P Offline
        paul_peter
        wrote on last edited by
        #5

        [quote author="kuzulis" date="1354107234"]Perhaps you need clear and delete all previous trash from your release dir[/quote]

        Now i cleaned these directories up you mentioned, deleted the source tree and build directories.
        Cloned the repository one more time, created the build directories and started the build process agin.
        But mingw32-make still stops with error code 2 and all these errors previously posted.

        1 Reply Last reply
        0
        • K Offline
          K Offline
          kuzulis
          Qt Champions 2020
          wrote on last edited by
          #6

          But, i don't know cause of problem, try update Qt to 4.8.3.
          Or try build library via QtCreator.

          1 Reply Last reply
          0
          • P Offline
            P Offline
            paul_peter
            wrote on last edited by
            #7

            [quote author="kuzulis" date="1354108910"]Or try build library via QtCreator.[/quote]

            Even this fails with the same error like in the command window. Supprisingly it just compiles fine when i use MSVC 2010 in QtCreator but this isn't a solution cause i'am using MinGW for my project i wanna use qtserialport for.

            1 Reply Last reply
            0
            • K Offline
              K Offline
              kuzulis
              Qt Champions 2020
              wrote on last edited by
              #8

              I just checked, everything is compiled fine.

              QtSdk-offline-win-x86-v1_2_1.exe & MinGW4.4 (from SDK) & Win7x64pro.

              Maybe it's some kind of your-specific problem.

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

                Why not follow the instructions outlined on the wiki page? http://qt-project.org/wiki/QtSerialPort

                1. Open a command prompt which has the MinGW environment setup.

                2. Navigate to a convenient temporary location to build the library and create "debug" and "release" folders
                  @cd ...
                  mkdir debug
                  mkdir release@

                3. Build and install the Debug version of the library: (use C:\path\to\qmake if qmake isn't part of your PATH environment variable)
                  @cd debug
                  qmake C:\Users\N\Downloads\qtserialport\qtserialport.pro
                  mingw32-make
                  mingw32-make install@

                4. Navigate to the release folder, build, and install the Release version of the library:
                  @cd ..\release
                  qmake C:\Users\N\Downloads\qtserialport\qtserialport.pro CONFIG+=release
                  mingw32-make
                  mingw32-make install@

                After this, you should be able to include a reference to the QtSerialPort library by adding CONFIG += serialport to your project's .pro file, and including the headers <QtAddOnSerialPort/serialport.h> and so forth.

                1 Reply Last reply
                0
                • P Offline
                  P Offline
                  paul_peter
                  wrote on last edited by
                  #10

                  [quote author="Twinky" date="1354172276"]Why not follow the instructions outlined on the wiki page? http://qt-project.org/wiki/QtSerialPort[/quote]

                  I allready tried this approach 7 post above i think, but just in case i tried it again.

                  At first i removed the whole Qt installation and coninced myself that every file is deleted.
                  Downloaded the offline installer QtSdk-offline-win-x86-v1_2_1.exe.
                  Installed Qt framwork again with MinGW 4.4.
                  Cloned the repository again.
                  changed into the root folder of the repo.
                  @
                  mkdir debug
                  mkdir release
                  @
                  added
                  C:\QtSDK\Desktop\Qt\4.8.1\mingw\bin
                  C:\QtSDK\mingw\bin
                  to my Path environment, reboot.
                  Changed into debug folder inside repo root dir.
                  Execute:
                  @
                  C:\Users\N\Downloads\qtserialport\debug>qmake ..\qtserialport.pro

                  C:\Users\N\Downloads\qtserialport\debug>mingw32-make
                  cd src/ && c:/QtSDK/Desktop/Qt/4.8.1/mingw/bin/qmake.exe c:/Users/N/Downloads/qtserialport/src/src.pro -o Makefile
                  cd src/ && mingw32-make -f Makefile
                  mingw32-make[1]: Entering directory c:/Users/N/Downloads/qtserialport/debug/src' cd serialport/ && c:/QtSDK/Desktop/Qt/4.8.1/mingw/bin/qmake.exe c:/Users/N/Downloads/qtserialport/src/serialport/serialport.pro -o Makefile syntaxerror. cp: cannot create regular file C:/Users/N/Downloads/qtserialport/debug/include/QtAddOnSerialPort': No such file or directory
                  cp: cannot create regular file C:/Users/N/Downloads/qtserialport/debug/include/QtAddOnSerialPort': No such file or directory cp: cannot create regular file C:/Users/N/Downloads/qtserialport/debug/include/QtAddOnSerialPort': No such file or directory
                  syntaxerror.
                  cp: cannot create regular file C:/Users/N/Downloads/qtserialport/debug/include/QtAddOnSerialPort': No such file or directory cp: cannot create regular file C:/Users/N/Downloads/qtserialport/debug/include/QtAddOnSerialPort': No such file or directory
                  cp: cannot create regular file C:/Users/N/Downloads/qtserialport/debug/include/QtAddOnSerialPort': No such file or directory syntaxerror. cp: cannot create regular file C:/Users/N/Downloads/qtserialport/debug/include/QtAddOnSerialPort': No such file or directory
                  cp: cannot create regular file C:/Users/N/Downloads/qtserialport/debug/include/QtAddOnSerialPort': No such file or directory cp: cannot create regular file C:/Users/N/Downloads/qtserialport/debug/include/QtAddOnSerialPort': No such file or directory
                  cd serialport/ && c:/QtSDK/mingw/bin/mingw32-make -f Makefile
                  mingw32-make[2]: Entering directory c:/Users/N/Downloads/qtserialport/debug/src/serialport' c:/QtSDK/mingw/bin/mingw32-make -f Makefile.Debug mingw32-make[3]: Entering directory c:/Users/N/Downloads/qtserialport/debug/src/serialport'
                  C:/QtSDK/Desktop/Qt/4.8.1/mingw/bin/moc.exe ...
                  g++ ...
                  @
                  ... (some more g++ lines)
                  @
                  Creating library file: debug/libSerialPortd1.a
                  mingw32-make[3]: Leaving directory c:/Users/N/Downloads/qtserialport/debu g/src/serialport' mingw32-make[2]: Leaving directory c:/Users/N/Downloads/qtserialport/debu
                  g/src/serialport'
                  mingw32-make[1]: Leaving directory c:/Users/N/Downloads/qtserialport/debu g/src' cd examples/ && c:/QtSDK/Desktop/Qt/4.8.1/mingw/bin/qmake.exe c:/Users/N/Downloads/qtserialport/examples/examples.pro -o Makefile cd examples/ && mingw32-make -f Makefile mingw32-make[1]: Entering directory c:/Users/N/Downloads/qtserialport/debug/examples'
                  cd cenumerator/ && c:/QtSDK/Desktop/Qt/4.8.1/mingw/bin/qmake.exe c:/Users/N/Downloads/qtserialport/examples/cenumerator/cenumerator.pro -o Makefile
                  cd cenumerator/ && c:/QtSDK/mingw/bin/mingw32-make -f Makefile/usr/bin/sh: c:/QtSDK/mingw/bin/mingw32-make: Invalid argument
                  mingw32-make[1]: *** [sub-cenumerator-make_default-ordered] Error 126
                  mingw32-make[1]: Leaving directory `c:/Users/N/Downloads/qtserialport/debug/examples'
                  mingw32-make: *** [sub-examples-make_default-ordered] Error 2

                  C:\Users\N\Downloads\qtserialport\debug>mingw32-make install
                  cd src/ && mingw32-make -f Makefile install
                  mingw32-make[1]: Entering directory c:/Users/N/Downloads/qtserialport/debug/src' cd serialport/ && c:/QtSDK/mingw/bin/mingw32-make -f Makefile install mingw32-make[2]: Entering directory c:/Users/N/Downloads/qtserialport/debug/src/serialport'
                  c:/QtSDK/mingw/bin/mingw32-make -f Makefile.Debug install
                  mingw32-make[3]: Entering directory `c:/Users/N/Downloads/qtserialport/debug/src/serialport'
                  cp c:/Users/N/Downloads/qtserialport/src/serialport/serialport-global.h c:/QtSDK/Desktop/Qt/4.8.1/mingw/include/QtAddOnSerialPort/
                  cp c:/Users/N/Downloads/qtserialport/src/serialport/serialport.h c:/QtSDK/Desktop/Qt/4.8.1/mingw/include/QtAddOnSerialPort/
                  cp c:/Users/N/Downloads/qtserialport/src/serialport/serialportinfo.h c:/QtSDK/Desktop/Qt/4.8.1/mingw/include/QtAddOnSerialPort/
                  cp c:/Users/N/Downloads/qtserialport/src/serialport/qt4support/serialport.prf c:/QtSDK/Desktop/Qt/4.8.1/mingw//mkspecs/features/
                  cp "debug/SerialPortd1.dll" "c:/QtSDK/Desktop/Qt/4.8.1/mingw/bin/SerialPortd1.dll"
                  cp "debug/SerialPortd.prl" "c:/QtSDK/Desktop/Qt/4.8.1/mingw/lib/SerialPortd.prl"

                  cp "debug/libSerialPortd1.a" "c:/QtSDK/Desktop/Qt/4.8.1/mingw/lib/libSerialPortd1.a"
                  cp "debug/SerialPortd1.dll" "c:/QtSDK/Desktop/Qt/4.8.1/mingw/lib/SerialPortd1.dll"
                  mingw32-make[3]: Leaving directory c:/Users/N/Downloads/qtserialport/debug/src/serialport' mingw32-make[2]: Leaving directory c:/Users/N/Downloads/qtserialport/debug/src/serialport'
                  mingw32-make[1]: Leaving directory c:/Users/N/Downloads/qtserialport/debug/src' cd examples/ && mingw32-make -f Makefile install mingw32-make[1]: Entering directory c:/Users/N/Downloads/qtserialport/debug/examples'
                  cd cenumerator/ && c:/QtSDK/mingw/bin/mingw32-make -f Makefile install
                  /usr/bin/sh: c:/QtSDK/mingw/bin/mingw32-make: Invalid argument
                  mingw32-make[1]: *** [sub-cenumerator-install_subtargets-ordered] Error 126
                  mingw32-make[1]: Leaving directory `c:/Users/N/Downloads/qtserialport/debug/examples'
                  mingw32-make: *** [sub-examples-install_subtargets-ordered] Error 2
                  @

                  At this point i stoped cause of the errors during installation

                  1 Reply Last reply
                  0
                  • T Offline
                    T Offline
                    Twinky
                    wrote on last edited by
                    #11

                    Hummm perhaps your command prompt doesn't have permissions. Can you try typing "cmd" from the start menu's search feature, then when the program shows up on the list, right click it and select "Run as administrator".

                    1 Reply Last reply
                    0
                    • P Offline
                      P Offline
                      paul_peter
                      wrote on last edited by
                      #12

                      [quote author="Twinky" date="1354194076"]Hummm perhaps your command prompt doesn't have permissions. Can you try typing "cmd" from the start menu's search feature, then when the program shows up on the list, right click it and select "Run as administrator".
                      [/quote]

                      This doesn't change anything, same errors like before.

                      1 Reply Last reply
                      0
                      • K Offline
                        K Offline
                        kuzulis
                        Qt Champions 2020
                        wrote on last edited by
                        #13

                        Then try comment in SUBDIRS build for examples and tests from qtserialport.pro,
                        i.e. make only library assembly.

                        1 Reply Last reply
                        0
                        • P Offline
                          P Offline
                          paul_peter
                          wrote on last edited by
                          #14

                          Ok right my new qtserialport.pro in the root folder of the repo is now

                          @
                          include(doc/doc.pri)

                          lessThan(QT_MAJOR_VERSION, 5) {
                          TEMPLATE = subdirs

                          SUBDIRS = src examples tests

                          SUBDIRS = src tests
                          CONFIG += ordered
                          
                          !infile&#40;$$OUT_PWD/.qmake.cache, SERIALPORT_PROJECT_ROOT&#41; {
                              system("echo SERIALPORT_PROJECT_ROOT = $$PWD >> $$OUT_PWD/.qmake.cache"&#41;
                              system("echo SERIALPORT_BUILD_ROOT = $$OUT_PWD >> $$OUT_PWD/.qmake.cache"&#41;
                          }
                          

                          } else {
                          load(qt_parts)
                          }
                          @

                          This cause an error while building the library in the src folder:

                          @
                          c:\Users\N\Downloads\qtserialport\debug>mingw32-make
                          cd src/ && c:/QtSDK/Desktop/Qt/4.8.1/mingw/bin/qmake.exe c:/Users/N/Downloads/qtserialport/src/src.pro -o Makefile
                          cd src/ && mingw32-make -f Makefile
                          mingw32-make[1]: Entering directory c:/Users/N/Downloads/qtserialport/debug/src' cd serialport/ && c:/QtSDK/Desktop/Qt/4.8.1/mingw/bin/qmake.exe c:/Users/N/Downloads/qtserialport/src/serialport/serialport.pro -o Makefile syntaxerror. cp: cannot create regular file C:/Users/N/Downloads/qtserialport/debug/include/QtAddOnSerialPort': No such file or directory
                          cp: cannot create regular file C:/Users/N/Downloads/qtserialport/debug/include/QtAddOnSerialPort': No such file or directory cp: cannot create regular file C:/Users/N/Downloads/qtserialport/debug/include/QtAddOnSerialPort': No such file or directory
                          syntaxerror.
                          cp: cannot create regular file C:/Users/N/Downloads/qtserialport/debug/include/QtAddOnSerialPort': No such file or directory cp: cannot create regular file C:/Users/N/Downloads/qtserialport/debug/include/QtAddOnSerialPort': No such file or directory
                          cp: cannot create regular file C:/Users/N/Downloads/qtserialport/debug/include/QtAddOnSerialPort': No such file or directory syntaxerror. cp: cannot create regular file C:/Users/N/Downloads/qtserialport/debug/include/QtAddOnSerialPort': No such file or directory
                          cp: cannot create regular file C:/Users/N/Downloads/qtserialport/debug/include/QtAddOnSerialPort': No such file or directory cp: cannot create regular file C:/Users/N/Downloads/qtserialport/debug/include/QtAddOnSerialPort': No such file or directory
                          cd serialport/ && c:/QtSDK/mingw/bin/mingw32-make -f Makefile
                          /usr/bin/sh: c:/QtSDK/mingw/bin/mingw32-make: Invalid argument
                          mingw32-make[1]: *** [sub-serialport-make_default] Error 126
                          mingw32-make[1]: Leaving directory `c:/Users/N/Downloads/qtserialport/debug/src'
                          mingw32-make: *** [sub-src-make_default-ordered] Error 2
                          @

                          the next attempt was to create an include dir containing an QtAddOnSerialPort dir inside the debug folder by hand, which solves a couple of issues.

                          @
                          c:\Users\N\Downloads\qtserialport\debug>mingw32-make
                          cd src/ && c:/QtSDK/Desktop/Qt/4.8.1/mingw/bin/qmake.exe c:/Users/N/Downloads/qtserialport/src/src.pro -o Makefile
                          cd src/ && mingw32-make -f Makefile
                          mingw32-make[1]: Entering directory c:/Users/N/Downloads/qtserialport/debug/src' cd serialport/ && c:/QtSDK/Desktop/Qt/4.8.1/mingw/bin/qmake.exe c:/Users/N/Downloads/qtserialport/src/serialport/serialport.pro -o Makefile syntaxerror. syntaxerror. syntaxerror. cd serialport/ && c:/QtSDK/mingw/bin/mingw32-make -f Makefile /usr/bin/sh: c:/QtSDK/mingw/bin/mingw32-make: Invalid argument mingw32-make[1]: *** [sub-serialport-make_default] Error 126 mingw32-make[1]: Leaving directory c:/Users/N/Downloads/qtserialport/debug/src'
                          mingw32-make: *** [sub-src-make_default-ordered] Error 2
                          @
                          after the make command this dir contains following header files:
                          serialport.h
                          serialport-global.h
                          serialportinfo.h
                          which i have seen before while compiling the project with MSVC2010.

                          1 Reply Last reply
                          0
                          • K Offline
                            K Offline
                            kuzulis
                            Qt Champions 2020
                            wrote on last edited by
                            #15

                            What info contains in /build-release-dir/.qmake.cache after first run qmake ...?

                            1 Reply Last reply
                            0
                            • P Offline
                              P Offline
                              paul_peter
                              wrote on last edited by
                              #16

                              [quote author="kuzulis" date="1354209844"]What info contains in /build-release-dir/.qmake.cache after first run qmake ...?
                              [/quote]

                              content of .qmake.cache in release dir:
                              @
                              SERIALPORT_PROJECT_ROOT = C:/Users/N/Downloads/qtserialport
                              SERIALPORT_BUILD_ROOT = C:/Users/N/Downloads/qtserialport/release
                              @

                              content of .qmake.cache in debug dir:
                              @
                              SERIALPORT_PROJECT_ROOT = C:/Users/N/Downloads/qtserialport
                              SERIALPORT_BUILD_ROOT = C:/Users/N/Downloads/qtserialport/debug
                              @

                              1 Reply Last reply
                              0
                              • K Offline
                                K Offline
                                kuzulis
                                Qt Champions 2020
                                wrote on last edited by
                                #17

                                Hmm.. In principle, all right. But I Do not know the cause of errors, sorry. :(

                                1 Reply Last reply
                                0
                                • P Offline
                                  P Offline
                                  paul_peter
                                  wrote on last edited by
                                  #18

                                  anyway many thanks for your advice.
                                  it's obviously an error just occours on my machine at work. i tried the whole procedure at my home pc and it works fine.

                                  1 Reply Last reply
                                  0
                                  • K Offline
                                    K Offline
                                    kuzulis
                                    Qt Champions 2020
                                    wrote on last edited by
                                    #19

                                    Also I was notified about this problem from another person.
                                    It turns out that qmake generates various Makefiles.

                                    For "normal" Makefile, used "" separator, and del, mkdir, copy /y, xcopy /s /q /y /i, move utilities.

                                    But for "bad" Makefile used "/" separator, and rm, mkdir -p, cp, cp -r, mv utilities.

                                    Most likely this is problem.

                                    1 Reply Last reply
                                    0
                                    • P Offline
                                      P Offline
                                      paul_peter
                                      wrote on last edited by
                                      #20

                                      i made some further investigations to track the error down.
                                      For this i executed mingw32-make with the -d option.
                                      The result is quit interresting.
                                      The last couple of output lines before the make process aborts are:

                                      @
                                      ...
                                      Finished prerequisites of target file c:/Users/N/Downloads/qtserialport/src/serialport/serialport_unix_p.h'. No need to remake target c:/Users/N/Downloads/qtserialport/src/serialport/serialport_unix_p.h'.
                                      Finished prerequisites of target file serialport.o'. Must remake target serialport.o'.
                                      mingw32-make[2]: Entering directory c:/Users/N/Downloads/qtserialport/debug/src/serialport' g++ -c -O2 -DUNICODE -DQT_LARGEFILE_SUPPORT -DQT_SERIALPORT_LIB -I'c:/Users/N/Downloads/qtserialport/src/serialport' -I'.' -I'c:/QtSDK/Desktop/Qt/4.8.1/mingw/mkspecs/default' -o serialport.o c:/Users/N/Downloads/qtserialport/src/serialport/serialport.cpp CreateProcess(c:\QtSDK\mingw\bin\g++.exe,g++ -c -O2 -DUNICODE -DQT_LARGEFILE_SUPPORT -DQT_SERIALPORT_LIB -Ic:/Users/N/Downloads/qtserialport/src/serialport -I. -Ic:/QtSDK/Desktop/Qt/4.8.1/mingw/mkspecs/default -o serialport.o c:/Users/N/Downloads/qtserialport/src/serialport/serialport.cpp,...) Putting child 0x0068c230 (serialport.o) PID 31241344 on the chain. Live child 0x0068c230 (serialport.o) PID 31241344 Main thread handle = 0x00000084 In file included from c:/Users/N/Downloads/qtserialport/src/serialport/serialport.cpp:45: c:/Users/N/Downloads/qtserialport/src/serialport/serialport.h:45:30: error: QtCore/qiodevice.h: No such file or directory In file included from c:/Users/N/Downloads/qtserialport/src/serialport/serialport.h:47, from c:/Users/N/Downloads/qtserialport/src/serialport/serialport.cpp:45: c:/Users/N/Downloads/qtserialport/src/serialport/serialport-global.h:45:21: error: qglobal.h: No such file or directory In file included from c:/Users/N/Downloads/qtserialport/src/serialport/serialport.cpp:46: c:/Users/N/Downloads/qtserialport/src/serialport/serialportinfo.h:46:26: error: QtCore/qlist.h: No such file or directory c:/Users/N/Downloads/qtserialport/src/serialport/serialportinfo.h:47:35: error: QtCore/qscopedpointer.h: No such file or directory c:/Users/N/Downloads/qtserialport/src/serialport/serialport.cpp:55:2: error: #error Unsupported OS c:/Users/N/Downloads/qtserialport/src/serialport/serialport.cpp:1085:30: error: moc_serialport.cpp: No such file or directory In file included from c:/Users/N/Downloads/qtserialport/src/serialport/serialport.cpp:45: c:/Users/N/Downloads/qtserialport/src/serialport/serialport.h:54: error: expected initializer before ':' token c:/Users/N/Downloads/qtserialport/src/serialport/serialport.cpp:1087: error: expected '}' at end of input c:/Users/N/Downloads/qtserialport/src/serialport/serialport.cpp:1087: error: expected '}' at end of input Reaping losing child 0x0068c230 PID 31241344 mingw32-make[2]: *** [serialport.o] Error 1 Removing child 0x0068c230 PID 31241344 from chain. mingw32-make[2]: Leaving directory c:/Users/N/Downloads/qtserialport/debug/src/serialport'
                                      Reaping losing child 0x0045c4c8 PID 4481488
                                      mingw32-make[1]: *** [sub-serialport-make_default] Error 2
                                      Removing child 0x0045c4c8 PID 4481488 from chain.
                                      mingw32-make[1]: Leaving directory `c:/Users/N/Downloads/qtserialport/debug/src'
                                      Reaping losing child 0x01d18200 PID 30538208
                                      mingw32-make: *** [sub-src-make_default-ordered] Error 2
                                      Removing child 0x01d18200 PID 30538208 from chain.
                                      @

                                      It seems like the compiler can't find the Qt header files, but im currently unable to solve this.

                                      1 Reply Last reply
                                      0
                                      • T Offline
                                        T Offline
                                        Twinky
                                        wrote on last edited by
                                        #21

                                        I recently had a similar problem, where the compiler will say it can't find the header files.

                                        This error occurred when trying to compile and install the library. I was able to resolve this with the following steps:

                                        Follow the build steps from the wiki. You will encounter errors saying that the header files are missing, but ignore them and proceed with make install.

                                        Copy the file c:/Users/N/Downloads/qtserialport/src/serialport/q4tsupport/serialport.prf to c:/QtSDK/Desktop/Qt/4.8.1/mingw/mkspecs/features/serialport.prf for some reason, this step is supposed to be automatic but didn't occur on my system.

                                        At this point Qt Creator should be able to detect the header files and properly link your projects

                                        1 Reply Last reply
                                        0
                                        • P Offline
                                          P Offline
                                          paul_peter
                                          wrote on last edited by
                                          #22

                                          ok i tried the suggestion of the last post.
                                          Before building the library i created following dirs inside the debug and release folder include/QtAddOnSerialPort to minimize the occouring errors.
                                          Now i followed the step by step building instruction from the wiki.
                                          Ignoring all the occouring errors.
                                          Checked the content of c:/QtSDK/Desktop/Qt/4.8.1/mingw/mkspecs/features/ an suprisingly noticed that serialport.prf was allready copied to this directory. It can't be there due to an previous attempt of building this because i reinstalled the whole qt installation before building the library again.
                                          Now building my project where i wanna use this lib.
                                          It aborts with
                                          @
                                          cannot find -lSerialPort
                                          @
                                          I'm not sure if there are some files missing now in the Qt installation. From my point of view the make install process copied all files properly.

                                          Edit: The error occurs just with release build configuration, with debug configuration everything is built fine :)
                                          Edit2: mingw32-make -d inside the release folder of lib itself aborts due to:
                                          @
                                          c:/qtsdk/mingw/bin/../lib/gcc/mingw32/4.4.0/../../../../mingw32/bin/ld.exe: cannot find -lSerialPort
                                          @

                                          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