Arpit Saxena Arpit Saxena - 2 months ago 19
C++ Question

Unable to build Qtsvg in windows using VS 2012 Express

i am using qt 5.5.0 for which I am trying to build qtsvg submodule

i am using the following steps.


1.Download Reqirements

  1. Qt source code (here i am using Qt 5.5.0)

  2. Visual Studio 2012 express

  3. ActivePerl-

  4. Python 3.5.0 (for x64) through the installer

  5. Jom

  6. Rubyinstaller-2.2.3-x64 or later

    1. Extract the source code in a directory( I’ve done it in “C:\Qt\5.5.0”)

    2. Extract jom in a directory.(i’ve extract in “c:\”)

    3. Set the environment variables(set them from properties of Computer->advanced System Settings->Advanced tabs->Environment Variables-> User Variables)



      Add below in PATH








    4. Restart or log off/on your computer in order to let environment variables changes take place.

    5. Open VS2012 x64 Cross Tools Win64 Command Prompt (2012) (In case of 64 bit build) or Visual Studio x86 Native Tools Command Prompt (2012) (In case of 32 bit build) in Administrator mode for msvc 2011 compiler.

[You will find command prompt here - ( C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Microsoft Visual Studio 2012\Visual Studio Tools )]

  1. On visual studio command prompt run the following commands

    cd C:\Qt\build\

    C:\Qt\5.5.0\configure -debug-and-release -shared -opensource -platform win32-msvc2012


After following all the above Steps, I found that qtsvg DIR is present in build, but as I am trying to use it in CMake, it is generating an Error, at Qtsvg is not found.
On Manually Coppying the Dir. The error is still Generate as:

CMake Error at C:/Qt/build/lib/cmake/Qt5Core/Qt5CoreMacros.cmake:327 (message):
Can not use "Svg" module which has not yet been found.
Call Stack (most recent call first):
CMakeLists.txt:50 (qt5_use_modules)

Can someone Help me or guide me what I am doing wrong?????


while Building Qt using the above mentioned method, I skipped to notice that for building all the modules of QT the build is obtained at Qbase directory any in CMake I was using the outer Directory which does not exist in this case the build is in C:\Qt\5.5.0\build-5.5.0\qtbase\lib\cmake\Qt5 however I was checking in C:\Qt\5.5.0\build-5.5.0\lib\cmake\Qt5 hence Cmake was not able to find the correct path