Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt Creator and other tools
  4. qmake does not create the Makefile for jom
Forum Updated to NodeBB v4.3 + New Features

qmake does not create the Makefile for jom

Scheduled Pinned Locked Moved Solved Qt Creator and other tools
20 Posts 2 Posters 7.1k Views 2 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.
  • SGaistS Offline
    SGaistS Offline
    SGaist
    Lifetime Qt Champion
    wrote on last edited by
    #5

    Can you show your complete .pro file ?

    Interested in AI ? www.idiap.ch
    Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

    1 Reply Last reply
    0
    • B Offline
      B Offline
      Bengt 0
      wrote on last edited by
      #6

      Sure.

      The linux and MacX versions compiles fine.

      QT	+= core gui widgets
      
      greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
      
      TARGET  = PAMS-Camera
      
      win32:  TEMPLATE = app
      macx:   TEMPLATE = app
      linux:  TEMPLATE = app
      
      
      CONFIG 	+= debug_and_release qt thread
      DEPENDPATH += . src ui
      INCLUDEPATH += . src ui
      
      macx {
      	MOC_DIR = GeneratedFiles/MacX
      	DEFINES	= _TTY_POSIX_
      	ICON = resources/USBCamera.icns
      }
      
      linux {
              MOC_DIR = GeneratedFiles/Linux
      #        DEFINES	= _TTY_POSIX_
              DEFINES += __LINUX__
              LIBS += -lueye_api
              ICON = resources/USBCamera.icns
      }
      
      
      win32 {
      	MOC_DIR = GeneratedFiles/Win32
      	INCLUDEPATH += "C:/Program Files/IDS/uEye/Develop/include"
      	QMAKE_LIBDIR += "C:/Program Files/IDS/uEye/Develop/Lib"
      	LIBS += -luEye_api -luEye_tools -lVersion
      	DEFINES	= _TTY_WIN_
      	ICON = resources/USBCamera.ico
      }
      
      RESOURCES	= resources/USBCamera.qrc
      RC_FILE	= resources/USBCamera.rc
      
      SOURCES	= src/main.cpp \
      		  src/about.cpp \
      		  src/MyCameraApp.cpp \
      		  src/MyCameraWindow.cpp \
      		  src/ApplicationInfo.cpp
      		  
      HEADERS	= src/MyCameraApp.h \
      		  src/about.h \
      		  src/MyCameraWindow.h \
                        src/ApplicationInfo.h \
                        src/PAMS_Camera_InfoStrings.h
      
      UI_DIR	= ui
      FORMS	= ui/videowindow.ui \
      		  ui/about.ui \
      		  ui/settings.ui
      
      
      
      
      
      
      1 Reply Last reply
      0
      • B Offline
        B Offline
        Bengt 0
        wrote on last edited by
        #7

        I should mention that my application is 32-bit, the os is Win10-64bit.
        The compiler is VS2013.
        Qt is 5.8

        1 Reply Last reply
        0
        • SGaistS Offline
          SGaistS Offline
          SGaist
          Lifetime Qt Champion
          wrote on last edited by
          #8

          You shouldn't modify QMAKE_LIBDIR, use the LIBS.

          Also, since you have spaces in your path, take a look at shell quote.

          Interested in AI ? www.idiap.ch
          Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

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

            Sorry about all these snippets...

            I should also mention that I have previously used VS2013 to build the project using 'qmake -t vcapp'. Now I got the idea it would be easier to maintain a cross platform project by using the same IDE on all three platfoms, i.e. QtCreator. So now I have used Win10 QtCreator with the same .pro file as I used to make the vcapp project. Maybe there are some leftovers from the VS history in my file structure that messes it up?

            1 Reply Last reply
            0
            • SGaistS Offline
              SGaistS Offline
              SGaist
              Lifetime Qt Champion
              wrote on last edited by
              #10

              You should remove the XXX_DIR lines you have. By default, Qt Creator uses shadow build so your sources stay clean from build artefacts.

              Interested in AI ? www.idiap.ch
              Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

              1 Reply Last reply
              1
              • B Offline
                B Offline
                Bengt 0
                wrote on last edited by
                #11

                Not sure I understand what 'XXX_DIR' means. Could you please elaborate?

                1 Reply Last reply
                0
                • B Offline
                  B Offline
                  Bengt 0
                  wrote on last edited by
                  #12

                  Significant progress here after removing QMAKE_LIBDIR.
                  Now I got rid of the error masses, instead I got this:

                  C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\ATLMFC\INCLUDE\afx.h(24) : fatal error C1189: #error : Building MFC application with /MD[d] (CRT dll version) requires MFC shared dll version. Please #define _AFXDLL or do not use /MD[d]
                  jom: C:\Users\bnilsson\Documents\QtCreator\build-PAMS-Camera-Desktop_Qt_5_8_0_MSVC2013_32bit-Debug\Makefile.Debug [debug\main.obj] Error 2

                  What controls this (MD[d] vs. MT[d]) in the .pro file?

                  1 Reply Last reply
                  0
                  • SGaistS Offline
                    SGaistS Offline
                    SGaist
                    Lifetime Qt Champion
                    wrote on last edited by
                    #13

                    This defines where your application/library use the dynamic Windows run-time or the static one. Qt uses the dynamic run time.

                    Interested in AI ? www.idiap.ch
                    Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                    1 Reply Last reply
                    0
                    • B Offline
                      B Offline
                      Bengt 0
                      wrote on last edited by
                      #14

                      So what can I do about this MD/MT error in the pro file?
                      Or should I change something in my sources?

                      1 Reply Last reply
                      0
                      • SGaistS Offline
                        SGaistS Offline
                        SGaist
                        Lifetime Qt Champion
                        wrote on last edited by
                        #15

                        I'd try adding DEFINES += _AFXDLL to the Windows specific part of the .pro file.

                        Interested in AI ? www.idiap.ch
                        Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                        1 Reply Last reply
                        1
                        • B Offline
                          B Offline
                          Bengt 0
                          wrote on last edited by
                          #16

                          Ok, another improvement, thanks.

                          Now it says

                          C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\ATLMFC\INCLUDE\afxv_w32.h(16) : fatal error C1189: #error : WINDOWS.H already included. MFC apps must not #include <windows.h>

                          and I cannot see that I do this anywhere.

                          Is really MFC the default for VS2013 and Qt?
                          Can it be controlled in some options settings?

                          1 Reply Last reply
                          0
                          • SGaistS Offline
                            SGaistS Offline
                            SGaist
                            Lifetime Qt Champion
                            wrote on last edited by
                            #17

                            No, Qt does not use any of MFC (except for the module provided to help transition your application from MFC to Qt). However your dependencies might be.

                            Interested in AI ? www.idiap.ch
                            Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                            1 Reply Last reply
                            0
                            • B Offline
                              B Offline
                              Bengt 0
                              wrote on last edited by
                              #18

                              Can I tell the VS2013 compiler not to use MFC?

                              1 Reply Last reply
                              0
                              • B Offline
                                B Offline
                                Bengt 0
                                wrote on last edited by
                                #19

                                My latest question about VS2013 and MFC is not applicable, since I have other QtCreator projects that actually compiles and runs properly. So there is probably nothing wrong or strange with my VS2013 compiler installation.
                                My plan now is to give up and rebuild this project gradually to see where the problem really lies.

                                Thanks SGaist for all the useful suggestions and support. I am a little wiser now than I was before.

                                1 Reply Last reply
                                1
                                • B Offline
                                  B Offline
                                  Bengt 0
                                  wrote on last edited by
                                  #20

                                  I have now found my problem.
                                  I had two files, with the same name but with different extensions, one .c and one .cpp.
                                  Only the .cpp file was "mentioned" in the .pro file, but they both were included in the Build. After removal of the .c file, everything became less confusing, and the remaining problems could be isolated to my own source files.
                                  Finally, it compiles and runs now.

                                  Again, thanks for the assistance.

                                  1 Reply Last reply
                                  1

                                  • Login

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