QtWebKit for Qt Visual Studio Add-in - visual-studio-2010

I want to learn how to use QtWebKit by creating a simple project, but I can't even install it. I found some tutorials like this, but it's for the standard Qt package. I am using for another project the Visual Studio Qt Add-in, so I don't want to uninstall it.
I found some WebKit source code in Qt-VS, but I don't know what to do with it. It does not contain any Perl script so the tutorial above is not good for it, but it does contain some makefiles. Or should I download the QtWebKit package separately, and follow the tutorial above? Will it generate compatible libraries? (I could not find any Qt command prompt, and the tutorial says the VS command prompt must be compatible. How do I know it?) Also, where should I move the binaries generated, so the project made with the built-in Qt template in Visual Studio to be able to find these new files?
Sorry for these lame questions, but I get lost really fast when it comes to building stuff from source and not given in binary form.
I would appreciate any feedback or link to stuff
EDIT:
The only thing I could pull of is to install another copy of Qt, the normal one, and use it for the WebKit project changing the Qt environment variable value each time I'm switching the project, but that would be the lamest thing ever.

Download the Qt 4.7.3 source code:
http://get.qt.nokia.com/qt/source/qt-everywhere-opensource-src-4.7.3.zip
Unzip and copy to a convenient location.
Open a Visual Studio 2010 command prompt.
You may need to run the command prompt as administrator. To do this, go to Start Menu > All Programs > Microsoft Visual Studio 2010 > Visual Studio Tools, right-click on Visual Studio Command Prompt (2010) and select Run as administrator.
To make a 64-bit build, select Visual Studio x64 Win64 Command Prompt (2010) instead.
Change the working directory to the Qt top folder.
Run the commands:
configure.exe -platform win32-msvc2010
nmake
Wait an hour.
This will build Qt, with all components, including QtWebKit.
Does this answer your question?

user763305's steps will work with these additions:
You need to install Perl. I used "ActiveState Perl"
You need to install WinFlex and WinBison. For some reason the QT script refers to the flex as "win_flex" but tries to find an executable called "bison.exe." I renamed "win_bison" to "bison.exe" and it worked.
I was also able to configure it successfully and build for msvc2012
configure.exe -platform win32-msvc2012
nmake
And it didn't take a few hours on my machine. Just about 55 minutes.

Related

Visual Studio 2017 - How to create a project from the source using CMake?

I have a pretty large software library using CMake to be compiled. We use Linux mostly, but now a new colleague wants to use Visual Studio.
Is there any way to create a new VS 2017 project from the existing source codes with CMake structure?
I know, it's possible to do it with CLion, but I have no idea about VS, as I have a very little experience with it.
Other questions seem to focus on creating an empty project, which will use CMake, but not on creating a project from already existing source files.
Creating a cmake project with visual studio
Creating a project with visual studio 2017
I'm not sure why you asked for details but...
Assuming you are using cmake 3.13 then you can do the following in a command shell:
cmake -G "Visual Studio 15 2017" -S path_to_source -B path_to_build
This will then create a solution file. Actually it creates a solution file for every project() command that is issued in CMakeLists.txt.
You can then open the solution file in Visual Studio, and build the project as usual.
You don't even need to do this in the Visual Studio GUI. After creating the initial project you can also issue the command:
cmake --build path_to_build
Which will kick off the build at the command line.
Now if your CMakeLists.txt in path_to_source is using Linux specific libraries or gcc specific compiler settings then the CMakeLists.txt will have to get updated to the Windows equivalent.
The alternative is to start Visual Studio and then use File->Open->CMake and open the CMakeLists.txt file in path_to_source. It'll then start to generate the project. But I prefer using the command line method.

Which "Individual Component" from the Visual Studio installer is suitable for Rust development?

I have a fully updated install of Visual Studio Enterprise 2017 (currently 15.9.2) on my machine, and I want to do some Rust coding. The Rust installer tells me to install "Visual C++" build tooling, but I can't seem to figure out which one is needed.
That is, I tried installing "VC++ 2017 version 15.9 v14.16", but when I do cargo run on my hello world application, it halts with a message:
error: linker link.exe not found
I don't want to go rampant and install all the C++ components in the installer, just the one I need. I'd prefer to install it as part of the Visual Studio installer, if possible.
Which "Individual Component" in the Visual Studio installer do I need for Rust?
Here's what's currently checked:
As a workaround, I was advised to run rustup default stable-x86_64-pc-windows-gnu which at least allows me to run the hello world example. (Or perhaps this is in fact a proper solution even?)
Installing any "VC++ toolset" should be enough to get cargo run to link properly. It looks like the minimum dependencies are:
Required dependencies are VC++ 2017 version 15.7 v14.14 latest v141 tools and Windows 10 SDK (10.0.17134.0)
Note that VC does not add its tools to the path (so that you can have multiple versions of the MS toolchain installed in parallel). Instead it adds entries to your Start menu like: "VC++ 2017 version 15.9 v14.16 command prompt" (not sure of the name), that allow you to start a command prompt with the proper path. This should also be possible from a VS toolbar button or menu entry.
You can't start cargo from a generic command prompt, you need to open the prompt with one of the above solutions.
Alternatively, you need to run c:\path\to\your\VS\installation\VCVARS.BAT inside your prompt to set the correct path before running cargo.

How to generate vcvarsall.bat

My visual Studio 2015 installed without vcvarsall.bat.
This is not about how to find this file and I am also not a python developer.
MSDN states at the bottom of this page:
The vcvarsall.bat file can vary from computer to computer. Do not
replace a missing or damaged vcvarsall.bat file by using a file from
another computer. Rerun Visual Studio Setup to replace the missing
file.
I am running the installation through our local IT department so I only get a fixed version of the setup. It looks like this setup does not install the batch file.
I wonder what other means of generating this "file" (actually it is several files and a folder structure) there are - how does the visual studio setup generate this file and is that generation possible without running the whole setup?
You have some option to "install" vcvarsall.bat.
The obvious to rerun VS setup and add c++ features (maybe your IT dep is kind enough and...)
Install visual c++ build tools
Install windows sdk (select c++ related components)

configure openCV Qt new functions

I'm struggling with the step from the official documentation
Extract it into a nice and short named directory like D:/OpenCV/dep/qt/ . Then you need to build it. Start up a Visual Studio Command Prompt (2010) by using the start menu search (or navigate through the start menu All Programs ‣ Microsoft Visual Studio 2010 ‣ Visual Studio Tools ‣ Visual Studio Command Prompt (2010)).
The Visual Studio command prompt
Now navigate to the extracted folder and enter inside it by using this console window. You should have a folder containing files like Install, Make and so on. Use the dir command to list files inside your current directory. Once arrived at this directory enter the following command:
configure.exe -release -no-webkit -no-phonon -no-phonon-backend -no-script -no-scripttools
-no-qt3support -no-multimedia -no-ltcg
...
My issue is that in this document Qt 4.7.3 was used, now, I dont know about that version because I wasn't able to find it but in the newer one there is not Install, Make files...
which ones should I use instead?
does anyone has any step for more recent version of Qt and VS that I can follow to get this done
I turns out I wasn't using the source file, which you can find here found the folder which contains the configuration and INTALLS files on the new version in a folder called qtbase continued with the steps from there on the OPENCV guide and everything worked alright on MSVS2012

Qt 5.3 configuration error for VisualStudio 2010

I am relatively new to the Qt. At the moment I'm trying to configure Qt library for my machine before installing add-in for VisualStudio'10. I tried to download Qt library only (withouth a Qt creator IDE), and found "qt-everywhere-opensource-src-5.3.2.zip" and extracted it to my external drive: "F:\Programs\Qt\5.3.2". Then I run command "configure" on VisualStudio command prompt.
F:\Programs\VStudio'10\VC>cd F:\Programs\Qt\5.3.2
F:\Programs\Qt\5.3.2>configure
After a while it gave me following error:
Running configuration tests...
NMAKE : fatal error U1077: 'F:\Programs\VStudio'10\VC\BIN\link.EXE' : return cod
e '0x463'
Stop.
Could not find output file: No such file or directory
WARNING: The DirectX SDK could not be detected:
There is no Direct X SDK installed or the environment variable "DXSDK_DIR" is
not set.
Disabling the ANGLE backend.
WARNING: Using OpenGL ES 2.0 without ANGLE.
Specify -opengl desktop to use Open GL.
The build will most likely fail.
On the installation instruction that was found on Qt webpage, it was said to set environmental variables: "Add this 2 paths to the Environment Variables: “C:\Qt\2009.01\bin” and
“C:\Qt\2009.01\qt\bin”." But I was unable to find any "bin" directory in my qt-everywhere folder. Instead I set up following variable to my path: "F:\Programs\Qt\5.3.2\Qtbase\bin". Still no help.
How can I resolve these issues? Any ideas and help are highly appreciated.
What you've done is more like attempting to prepare building Qt itself from the source code (but that is not exactly how to do that, anyway). You don't need that at least now but when you start customize Qt framework, say, for static build. That is when configure tool comes handy. And you will need to read on that.
You need just to download its installer from: http://qt-project.org/downloads
I assume you don't have prebuilt Qt and Qt Creator in your system but that is prerequisite for what you want to do. Take either Community version or start download immediately. After you've installed certain Qt version for your platform including Qt Creator (which is native Qt IDE) you will also be able to install and use Visual Studio AddIn. And then take Visual Studio AddIn for Qt 5 from: http://download.qt-project.org/official_releases/vsaddin/qt-vs-addin-1.2.3-opensource.exe and install it. Read the instruction on how to use it. There will be some new menu for importing Qt project, though.
BTW, Qt Creator itself is not bad at all and maybe preferable for most of Qt development tasks except some debugging. I maintain entire project in Qt Creator and write the code there and only occasionally go to Visual Studio with AddIn installed to import Qt project there for some better debug experience.
you can try run "configure -opengl"
or , you can download Microsoft DirectX SDK and install it ,then try again.
http://www.microsoft.com/en-us/download/details.aspx?id=6812

Resources