Llink Winmm.lib to Qt creator - qt

Im having problems linking Winmm.lib to Qt creator, when I try to link it the library file dialog box turns red and next button is disabled.
Im using Microsoft SDKs Winmm.lib that comes with Microsoft Visual Studio 2010, qtcreator5 and mingw.
Help please.

When linking against libraries from the Microsoft Windows SDK, you need to be sure to use the Visual C++ 2010 or Visual C++ 2012 compiler and not the MinGW compiler. Visual C++ and MinGW create different and incompatible binaries and can't be linked interchangeably. If there is a library you want to use with MinGW, make sure to build it from source against MinGW. The same goes for Visual C++ 2010 and Visual C++ 2012.

Related

How can I compile QT 4 dlls with msvc 2019?

I have an old project using QT 4.6.2 that runs on VS 2008. I was able to compile it in VS 2019 with msvc 2019 toolchain but it crashes in run time. I see that the problem happens because when I use the QString::toStdString() function, it involves QTCore4.dll using msvc90.dll (VS2008), but when destroying the std::string the app uses msvc2019. This mismatch ends in the app crash.
I want to fix it by recompiling QTCore4.dll using the msvc 2019 but have no idea how to do this. I got the dll by installing QT and have no instructions how to recompile it.
Is it even possible or is it closed source?
I assume upgrading to QT 5 is also an option but I would like to stay with QT 4 for now.
Qt 5 is largely source compatible with Qt 4. I would first highly recommend trying to compile your project (and fixing any small issues) against Qt 5.
If you need the Qt Declarative module, you can compile it against Qt 5 if you must.
That being said, Qt is released under the Open Source LGPL license.
You can fetch the Qt 4 source code from github: https://github.com/qt/qt
Building Qt 4 involves having perl installed and running configure followed by nmake (for Visual Studio). You will need to set up some new things for Visual Studio 2019, and potentially fix code incompatibilities that the 2019 version compiler digs up.

Setup qtcreator using Microsoft Enterprise WDK

I'm trying to setup qtcreator using Microsoft Enterprise WDK.
I want to build MSVC and UWP apps, but I do not want to install MS VisualStudio.
Does anyone know howto setup debugger cdb, c and c++ compiler, ... for qtcreator. Since MS EWDK is unzipped in a folder like C:\Dev qtcreator cannot auto-detect it.
I also flipped through the QT documentation, but it is confusing me.
I still have no solution to integrate EWDK into qtcreator.
But there is an alternative to install a "minimum" Microsoft environment for qtcreator:
Install the Visual Studio Build-Tools, which is new as of 2017 and only select the build-tools for C++
Install only the debugger from Windows SDK

How to install qt add-in (for Qt 4x) for Visual Studio 2012

How to install qt add-in (for Qt 4x) for Visual Studio 2012?
Installator told that there are no supported version on Visual studio is installed.
UPDATE:
Exact msvs 2012, exact Qt Addin 1.1.xxx (not 1.2.xxx)
This answer indicates that it is possible with Qt VS Add-in 1.2.2, though there are some limitations to its support of Qt 4.x. As far as full-blown support for Qt 4.x in VS 2012, I'm afraid that it may not be possible.
If you really need this support, I'd suggest requesting it via the Qt Project forums or their JIRA bug tracking system.

Configuration of Qt in Visual C++ 2010

I am using the Visual C++ 2010 compiler. How can Qt be compiled in Visual C++?
The current version of Qt (4.6) doesn't support Visual Studio 2010:
http://doc.qt.nokia.com/4.6/supported-platforms.html
However as you can see on that link, Qt 4.7 does plan to support it.
Can you use Visual Studio 2008 instead? I have been using it with the Qt plugin. You might need the full version of VS 2008 though - I don't think you can install the Qt plugin in the Express version.
If the full version of Visual Studio 2008 isn't an option, you might be better off using Eclipse with Qt integration, or QtCreator (available from the Qt website.) If you are planning on compiling your Qt project on other platforms, one of these would probably be a better choice in any case, since the Visual Studio project format doesn't translate to other platforms (to my knowledge.)
if you want, I can send you a detailed description of the installation and compile procedure with Visual Studio 2008

Porting QT application from Linux to Windows?

Greetings all,
We are developing a QT application (QT 4.6 LGPL version) in Linux platform.All the libraries we use are cross-platform.
Now we want to port it into Windows and continue develop in Windows.
My questions are:
Which compiler should we use ,Can we use MinGW or Visual C++ compiler?
2.If its Visual C++ compiler, which Visual Studio version should be used ,can we use 'Visual C++ Studio 2010 express' ?
thanks in advance.
The easiest, by far, is to install QtCreator. it includes MinGW and simply opens the same project files as on linux. compile, and go!
A huge advantage of MinGW over VC++ is that it doesn't make you chase circles around getting the right vcredist library for the exact version of the compiler, nor it cares too much about debug/release builds. To deploy, just be sure to copy the same one or two DLLs you have on the development machine. A few more for Qt, but these are well-documented on Qt docs. No hidden surprises.

Resources