Using Qt with Visual Studio 2010 Express - visual-studio-2010

How can I use Qt with Visual Studio 2010 Express Edition? The express edition doesn't allow addins, so I can't use the Qt plugin for VS. I haven't been able to find anything I can follow; most discussions about this center on building Qt for VS 2010, but now that there are precompiled libraries for it that shouldn't be an issue.

Download and install the Qt libraries from http://releases.qt-project.org/qt4/source/qt-win-opensource-4.8.3-vs2010.exe
Setup your project using a qmake project file (.pro)
On the command line, call qmake then nmake
Using an IDE, either QtCreator or Eclipse would work - both can be set up to use qmake as the build tool
In essence, you basically only need the compiler and the linker from VS Express to build Qt applications.

Related

Can I use qt5 in visual studio without the add-in?

I understand I can use Qt5 in Visual Studio by using the Visual Studio Add-in for Qt as mentioned in Building Qt5 with Visual Studio 2012 / Visual Studio 2013, and integrating with the IDE.
Is it possible to use Qt5 in Visual Studio without using the Add-in?
Also, I would like to use CMake to generate the Visual Studio Project.
Yup.
I have it working for a pretty complex subdirs template.
Qmake can generate the visual studio solution file and vcxproj, look here:
http://doc.qt.io/qt-5/qmake-platform-notes.html#creating-visual-studio-project-files
What I do is use the Qmake project as the master project, and generate the VS stuff out of folder as temporaries. This prevents Visual studio from tangling up in your source files as well as in the qmake stuff. And you can also port it to other OSs without any hassle. Using this approach, if you want to add files to your project, don't do it through VS, but add it to the .PRO file and re-run qmake.
The only thing (that I've found) is if you change anything that needs to be MOC'd, then re-run qmake.
If you want CMake exclusively then this is a nice guide
http://www.kdab.com/using-cmake-with-qt-5/.
The qmake way is a little cleaner as you don't get all the extra noise of finding Qt libraries as you need in CMake.

install VC++ Debug Runtime Distributable

Is there anyway to install or have VC++ Debug Runtime Distributable without installing Visual Studio ?
Just to run a dll that has been compiled in debug mode using VS2013 on another machine that hasn't VS2013.
For testing purposes, you can include the Debug DLLs you need 'side-by-side' with your application. You can find them on a machine with VS 2013 installed:
C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\redist\Debug_NonRedist
When you deploy your app, you must use Release mode distributions. For Win32 desktop apps, use these instructions. For Windows Store apps, you don't have to deploy the CRT as it's handled by the Windows Store.
OP was asking about 2013, but the title is general, so..
I just wanted to point out that in newer Visual Studio releases with the "select what you want" installer, for the debug runtime you need just "tools" or "build tools" (e.g. VC++ 2017 version 15.9 v14.16 latest v141 tools or MSVC v142 - VS 2019 C++ Build Tools, not to be confused with the toolset)
As for where you can find the libs, VS 2015 still has them basically in the same path outlined in Chuck's answer. From 2017, you should have something like:
<root>\Microsoft Visual Studio\2017\Community\VC\Redist\MSVC\14.16.27012\debug_nonredist

How to configure Glib on Microsoft Visual Studio 2010?

i'm trying to port to Windows a C project wrote to work on Linux. It's a simple project that depends CUDA and Glib librarys.
I believe the best way is to compile with Microsoft Visual Studio 2010, but i don't have idea how to link Glib to this project. CUDA code is going well, but every call to Glib methods generate a "unresolved external symbol" error.
i just solved my problem using this guide to configure GTK on Visual Studio 2008:
http://www.etechplanet.com/blog/visual-studio-2008-configuration-for-gtk2b-gui-development.aspx
The only change i done was about the Tools/Options/VC++ Directories because this was deprecated on VS2010. I added the paths directly to the project properties.

Possible to use Qt Open Source integrated in Visual Studio?

I'm currently having issues installing Qt (Open Source Edition) such that I can use it in integrated into Visual Studio 2010. I realize that the 2008 edition will have deployment issues, and so I installed it from the source, only to be missing qtmaind.lib.
Anyways, I was looking around for a solution to this, and I came upon this: http://doc.qt.io/qt-4.8/install-win.html, which states:
Open Source Versions of Qt is not officially supported for use with
any version of Visual Studio. Integration with Visual Studio is
available as part of the Qt Commercial Edition.
Anyways, I thought maybe this was the reason I was having problems, and so I wanted to ask the following question:
Is it possible to integrate Open Source Qt into Visual Studio?
Absolutely. I use Qt 4.7 integrated with Visual Studio 2005.
I configured Qt this way:
configure -debug-and-release -opensource -shared -ltcg
-no-accessibility -no-qt3support
Once Qt was built (via nmake), I also installed the Qt Visual Studio Add-in.

Building a library with Visual Studio that can be linked to a Qt project?

Right now I have some libraries that link easily to Visual Studio projects but I can't figure out how to link them with Qt. My idea is to write a VS project that wraps the functionality I need from the libraries, then compile that to a library which can be linked to Qt. From my understanding, VS and Qt use compilers that create incompatibile libraries. My questions are:
Can I modify VS or Qt in a way that I can compile a library in VS which can be linked to Qt?
Is there a simpler solution to this problem?
The specific library I'm using is Nitro-Nitf. For my Qt project I'm using Qt Creator and for Visual Studio I'm using VS 2008.
Yes, the Windows binaries provided by Qt are built using MinGW. If you build Qt from source using Visual Studio, then your libraries will be compatible.
Although I haven't tried it, Qt Creator 1.2 introduces support for MS compilers, so you should be able to continue to develop your Qt projects in Creator.
Qt is available as source code, you can build it with whatever toolchain you like. Visual Studio is an IDE (integrated development environment) that normally invokes the microsoft compiler (cl) and linker (ld), although you can configure a Visual Studio project file to do a makefile build, or IIRC, invoke any other program you like to do the build step (at my previous job, we built our Qt apps with cl and ld, and could debug with Visual Studio just fine, since about 2005).
Also, it appears this "NITRO" project is open source, so you can download the source instead of a pre-built binary, and build it using MinGW if you'd like to build Qt apps with MinGW, or if you are using pre-built Qt libraries that were built with MinGW.
To build Qt4.5 with visual studio
Download the source
./configure.exe -platform win32-msvc2008 or win32-msvc2010
nmake
There is even a free release of the visual studio plugin to make handling all the autogenerated code automatic in visual studio

Resources