Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. 3rd Party Software
  4. QWT-6.20 In function WinMain: undefined reference to qMain Qt 5.15.2 mingw810_64
Forum Updated to NodeBB v4.3 + New Features

QWT-6.20 In function WinMain: undefined reference to qMain Qt 5.15.2 mingw810_64

Scheduled Pinned Locked Moved Solved 3rd Party Software
3 Posts 2 Posters 547 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.
  • C Offline
    C Offline
    Cedric-air
    wrote on last edited by
    #1

    I'm trying to compile qwt on Windows, like explained here:
    https://qwt.sourceforge.io/qwtinstall.html

    I've downloaded and extracted qwt, and then given these commands:

    cd Downloads\qwt-6.2.0\qwt-6.2.0
    qmake qwt.pro
    mingw32-make
    

    After a few seconds, I see this error:

    mingw32-make[3]: Entering directory 'C:/Users/cedric/Downloads/qwt-6.2.0/qwt-6.2.0/tests/splinetest'
    linking ../bin/splinetest.exe
    C:\Qt\5.15.2\mingw81_64\lib\libqtmain.a(qtmain_win.o): In function `WinMain':
    C:\Users\qt\work\qt\qtbase\src\winmain/qtmain_win.cpp:97: undefined reference to `qMain(int, char**)'
    collect2.exe: error: ld returned 1 exit status
    mingw32-make[3]: *** [Makefile.Release:68: ../bin/splinetest.exe] Error 1
    mingw32-make[3]: Leaving directory 'C:/Users/cedric/Downloads/qwt-6.2.0/qwt-6.2.0/tests/splinetest'
    mingw32-make[2]: *** [Makefile:49: release-all] Error 2
    mingw32-make[2]: Leaving directory 'C:/Users/cedric/Downloads/qwt-6.2.0/qwt-6.2.0/tests/splinetest'
    mingw32-make[1]: *** [Makefile:51: sub-splinetest-make_first] Error 2
    mingw32-make[1]: Leaving directory 'C:/Users/cedric/Downloads/qwt-6.2.0/qwt-6.2.0/tests'
    mingw32-make: *** [Makefile:314: sub-tests-make_first-ordered] Error 2
    

    My versions:

    qwt 6.2.0
    qt 5.15.2
    mingw810_64
    
    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi and welcome to devnet,

      Unless you are going to hack on Qwt, just disable the tests building.

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

      C 1 Reply Last reply
      1
      • SGaistS SGaist

        Hi and welcome to devnet,

        Unless you are going to hack on Qwt, just disable the tests building.

        C Offline
        C Offline
        Cedric-air
        wrote on last edited by
        #3

        @SGaist Thank you, that solved it. After extracting the files, I edited qwt.pro, and commented out the lines that run the tests:

        ################################################################
        # Qwt Widget Library
        # Copyright (C) 1997   Josef Wilgen
        # Copyright (C) 2002   Uwe Rathmann
        #
        # This library is free software; you can redistribute it and/or
        # modify it under the terms of the Qwt License, Version 1.0
        ################################################################
        
        lessThan(QT_MAJOR_VERSION, 5) {
        
            lessThan(QT_MINOR_VERSION, 8) {
                error(Qt >= 4.8 required.)
            }
        }
        
        include( qwtconfig.pri )
        
        TEMPLATE = subdirs
        CONFIG   += ordered
        
        SUBDIRS = \
            src \
            classincludes \
            doc
        
        contains(QWT_CONFIG, QwtDesigner ) {
            SUBDIRS += designer 
        }
        
        contains(QWT_CONFIG, QwtExamples ) {
            SUBDIRS += examples 
        }
        
        contains(QWT_CONFIG, QwtPlayground ) {
            SUBDIRS += playground 
        }
         
        #contains(QWT_CONFIG, QwtTests ) {
        #    SUBDIRS += tests 
        #}
        
        qwtspec.files  = qwtconfig.pri qwtfunctions.pri qwt.prf
        qwtspec.path  = $${QWT_INSTALL_FEATURES}
        
        INSTALLS += qwtspec
        

        After that the below steps run without problems:

        qmake qwt.pro
        mingw32-make -j 6
        mingw32-make install
        
        1 Reply Last reply
        1
        • C Cedric-air has marked this topic as solved on
        • S skishore1998 referenced this topic on

        • Login

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