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] How to compile QT examples with QT creator and visual studio 2012 compiler
Forum Updated to NodeBB v4.3 + New Features

[SOLVED] How to compile QT examples with QT creator and visual studio 2012 compiler

Scheduled Pinned Locked Moved General and Desktop
qt examplesqt applicationqt3d
2 Posts 1 Posters 2.2k 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.
  • A Offline
    A Offline
    ArMD
    wrote on 9 Mar 2015, 07:35 last edited by ArMD 3 Nov 2015, 11:10
    #1

    Hi,

    I used the following configure options and commands to build qt5.5:

    configure -developer-build -opensource -confirm-license -platform win32-msvc2013 -opengl desktop -nomake examples -nomake tests
    nmake

    QT is built successfully. After this, I installed QT creator 3.4.0 beta and configured qmake for qt5.5 and using Microsoft Visual studio C++ compiler 12.0 . Now when i try to build the qt3D examples using the QT creator, I am getting the following compile errors:

    cpp.exe.2968.1625.jom
    qtmain.lib(qtmain_win.obj) : error LNK2019: unresolved external symbol __imp__CommandLineToArgvW@8 referenced in function _WinMain@16
    release\cylinder-cpp.exe : fatal error LNK1120: 1 unresolved externals
    jom: C:\qt5.5\build-qt3d-Desktop-Release\examples\cylinder-cpp\Makefile.Release [release\cylinder-cpp.exe] Error 1120
    jom: C:\qt5.5\build-qt3d-Desktop-Release\examples\cylinder-cpp\Makefile [release] Error 2
    12:57:27: The process "C:\Qt\qtcreator-3.3.81\bin\jom.exe" exited with code 2.
    Error while building/deploying project qt3d (kit: Desktop)
    When executing step "Make"
    12:57:27: Elapsed time: 00:03.

    I understand that this error is because of winmain function missing which is required by visual studio compiler for any windows applications, However how does qt take care of it? What are the header files to be included to avoid this error for qt examples?
    Please help me with your suggstions and let me know if I am missing any steps also.

    1 Reply Last reply
    0
    • A Offline
      A Offline
      ArMD
      wrote on 11 Mar 2015, 11:05 last edited by
      #2

      I was able to resolve this problem. The issue was, I had run "nmake install" instead of "nmake".
      refer to : https://bugreports.qt.io/browse/QTBUG-44862.

      1 Reply Last reply
      0

      1/2

      9 Mar 2015, 07:35

      • Login

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