"License file does not contain proper license key." on configure



  • I'm trying to do some modifications on an old vs2010 c++ build that uses QT. I'm following the instructions left behind by the developer and using a trial license for now (slow procurement in our business + need to get some development done "yesterday") however I'm getting an issue trying to build QT. I'm following these instructions:

    http://doc.qt.io/qt-4.8/install-win.html

    C:\Qt\4.8.4>configure
    Reading license file in.....C:\Users\User/.qt-license
    License file does not contain proper license key.

    Downloaded the license file which looks like this:

    The "headings" have "# " in front of them, not sure how to stop the formatting:

    Qt product license file

    CustomerID="XXX"
    LicenseID="XXX"
    Licensee="LastName FirstName"
    Products="Qt for Application Development"
    ExpiryDate=2015-10-07

    Used for Qt 3.x

    LicenseKey=XXXX-XXXX-XXXX

    Used for Qt 4.x and Qt 5.0

    LicenseKeyExt=XXXX

    Used for Qt 5.1 ->

    Qt5LicenseKey=XXXX


  • Lifetime Qt Champion

    Hi and welcome to devnet,

    That's a question better asked directly to the folks of the Qt Company.

    However, can you try to build a more recent version of Qt 4 ? I don't think it will really make a difference but maybe the license format changed in between (4.8.4 is a bit old by now)



  • Thanks, I'll try with the latest version. Hopefully there's not going to be an issue building the project


  • Lifetime Qt Champion

    You should only get bug fixes ;)

    Qt guaranties forward compatibility (also BC) between release in a major version so you can build old Qt 4 code with newer version without any problem. Backward should also work as long as you don't use a feature added in a newer version.



  • Hmm, I'm having problems even running the "configure" script

    C:\Qt\Qt5.5.0>configure
    'configure' is not recognized as an internal or external command,
    operable program or batch file.


  • Lifetime Qt Champion

    Aren't you trying to build an already installed Qt ?



  • Um, I have no idea. Sorry... I downloaded "Qt for Windows MSVC2010 32-bit" from the https://account.qt.io/downloads page with "5.5" and "QT" selected, wheras previously I used "qt-win-commercial-4.8.4-vs2010".


  • Lifetime Qt Champion

    So yes, that's what you are trying to do.

    These packages provides you with a ready to use Qt (if you have Visual Studio installed) If I may, i'd recommend the online installer, it lets you easily install several versions of Qt in parallel including 4.8.7



  • Thanks for the help. I seem to have gotten things working! Well, some of the projects have compiled successfully with references to QT libraries. I'm having lots of errors (900+) around "WFlags" though (which no one else on the internet seem to have come across) :

    Error 771 error C2061: syntax error : identifier 'WFlags'
    Error 772 error C2039: 'WFlags' : is not a member of 'Qt'

    Eg with the line:

    BaseWidget (QWidget* parent = 0, Qt::WFlags flags = 0);

    According to the documentation it should be still usable though:
    http://doc.qt.io/qt-5/qt-obsolete.html


  • Lifetime Qt Champion

    IIRC, you have to use QT_DISABLE_DEPRECATED_BEFORE to enable it again, however a search replace would probably be a better idea on the long run.



  • Thanks. You are a livesaver. I did a find/replace and went through all the obsolete parts and updated them. Nearly all the projects built successfully I'm just having one more (I hope) problem with the QT build...

    It seems it can't find the moc.exe? I'm getting the error:

    1> Moc'ing dems_IdIdentifier.h...
    1> The system cannot find the path specified.
    1>C:\Program Files\MSBuild\Microsoft.Cpp\v4.0\Microsoft.CppCommon.targets(151,5): error MSB6006: "cmd.exe" exited with code 3.

    When I have a look at line 151 it appears to be this CustomBuild settings. I can't find any incorect path's to the moc.exe though. I've added it's location "C:\Qt\Qt5.5.0\5.5\msvc2010\bin" to the PATH.

    <CustomBuild
      Sources                     ="@(CustomBuild)"
      BuildSuffix                 ="$(BuildSuffix)"
    
      TrackerLogDirectory         ="%(CustomBuild.TrackerLogDirectory)"
      MinimalRebuildFromTracking  ="%(CustomBuild.MinimalRebuildFromTracking)"
    
      TLogReadFiles               ="@(CustomBuildTLogReadFiles)"
      TLogWriteFiles              ="@(CustomBuildTLogWriteFiles)"
      TrackFileAccess             ="$(TrackFileAccess)"
      ToolArchitecture            ="$(CustomBuildToolArchitecture)"
      TrackerFrameworkPath        ="$(CustomBuildTrackerFrameworkPath)"
      TrackerSdkPath              ="$(CustomBuildTrackerSdkPath)"
    
      AcceptableNonZeroExitCodes  ="%(CustomBuild.AcceptableNonZeroExitCodes)"
      >
    </CustomBuild>


  • I'm just being an idiot... I managed to miss updating some of the projects using the extension. Ignore me!



  • Argh, 6791 errors! They're all link errors:

    Error LNK2001: unresolved external symbol "__declspec(dllimport) public: void __thiscall QWidget::setWindowTitle(class QString const &)" (_imp?setWindowTitle@QWidget@@QAEXABVQString@@@Z) C:\Users\MOD_3\Documents\Visual Studio 2010\Projects\Dems\dems\solution\projects\demshmi\dems_Hmi.obj

    In here (https://forum.qt.io/topic/28526/qt5-linker-error-for-vs2012-solved/3) you say the solution is to

    "include a line like
    @
    QT += widgets
    @"

    in the "pro" file. I didn't have a pro file so I created one with the extension. The error remains and I do have the line:

    QT += core multimedia sql opengl widgets gui


  • Lifetime Qt Champion

    If you are using the Qt VS AddIn module you can follow the instructions here



  • I'm pretty sure that's how I've got it set up:
    http://i.imgur.com/ulc4zlL.png

    I keep reading that I need to run "qmake" does this mean literally run the qmake.exe in the bin directory?


  • Lifetime Qt Champion

    It's been a long time since I used the AddIn, I don't remember what would be the equivalent of rerunning qmake. However, doing a full rebuild (maybe nuke the build folder entirely) might do the trick.



  • Tried to do a nuke, didn't seem to work.

    Finally tracked it down! I think. I needed to add:

    C:\Qt\Qt5.5.0\5.5\msvc2010\lib\Qt5Widgets.lib

    to the additional dependencies of the input section of the "linker". I have some library projects that seem to be having issues and there's no "linker" section though.


  • Lifetime Qt Champion

    Thought that the plugin would have take care of updating it for you…

    Everything is working now ?



  • Almost! Thank you for the help.

    I got it to build in release mode, but strangely when I change to debug (there's a runtime error) I 'm back to square one, with it unable to find the QT includes! I checked and the (QTDIR) is the correct path this time:

    Error C1083: Cannot open include file: 'QApplication': No such file or directory C:\Users\User\Documents\Visual Studio 2010\Projects\Project\file.cpp

    Edit I think I only did all those changes to the release build properties! Will change the debug to match and fingers crossed everything should work.



  • I need to build the IBASE SQL drivers, but I've no idea how to download the source. I created a new post though as this one is getting very long and not much to do with the title.
    https://forum.qt.io/topic/58594/where-do-i-actually-get-the-src-files-for-5-5

    Thanks for the help, I got it to build at last.


  • Lifetime Qt Champion

    Indeed, you could even set this one to solved since you have things working :)


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.