uWebSockets https://github.com/uNetworking/uWebSockets
How to use this from Visual Studio C++ ? I wish to implement a simple websocket server. I don't want to use Makefile, wish to use normal visual studio project build.
This is how to use uWebsockets from Visual C++ IDE project, step by step:
Install Vcpkg https://github.com/microsoft/vcpkg
then command line the following
set VCPKG_DEFAULT_TRIPLET=x64-windows
vcpkg install uwebsockets
At this point there is then a folder vcpkg\installed\x64-windows which contains the header files and library files and dlls (if you need the dlls).
In your Visual C++ project properties set the include directory and lib directory in the VC Directories.
Then #include <uwebsockets/App.h> and paste code from uwebsockets.
Related
I'm using vcpkg as library manager for my Visual C++ projects. Sometimes I link libraries dynamically and vcpkg provides dll's in \vcpkg\installed\x64-windows\bin folder.
When I run project in Debug or Release mode I have error related to missing DLL. What is elegant way to organize Visual C++ to take dll's from vcpkg folder?
I need to be able to distribute Visual C++ Runtime Distributables 2010 in Visual Studio 2012 using ClickOnce. How do I get the 2010 C++ bootstrapper to appear in the VS 2012 Prerequisites? The 2012 bootstrapper is already there. Can I have both?
You can accomplish this by hacking your project file and copying some files. The example below is for using the Visual C++ 2012 Runtime libraries in Visual Studio 2013. You will have to change some version numbers if you are using a different version of Visual Studio or want a different version of the Visual C++ Runtime libraries.
First add the following to your project file:
<ItemGroup>
<BootstrapperPackage Include="Microsoft.Visual.C++.11.0.x64">
<Visible>False</Visible>
<ProductName>Visual C++ 2012 Runtime Libraries %28x64%29</ProductName>
<Install>true</Install>
</BootstrapperPackage>
</ItemGroup>
The example above is for the 64-bit version of the Visual C++ 2012 Runtime Libraries. If you want to use the 32-bit version you should replace x64 with x86. And if you want to use a different version of the C++ library you will have to change the 11.0 version number. If you open your project at this point and go to the prerequisites you will notice a warning that Visual Studio 2013 cannot find the Visual C++ Runtime Libraries. To fix this you will need to copy some files.
Go to the following folder: C:\Program Files (x86)\Microsoft SDKs\Windows\v8.0A\Bootstrapper\Packages. If you want a different version of the C++ Runtime Libraries you should change the v8.0a version number.
Copy the folder vcredist_x86 to the folder that Visual Studio 2013 uses: C:\Program Files (x86)\Microsoft SDKs\Windows\v8.1A\Bootstrapper\Packages. Make sure you use a different name to avoid overwriting the 2013 libraries. I used vcredist_x64.2012.
At this point you can open your solution and publish your solution. When users install your application they will be asked to also install the C++ Runtime libraries. If your users already installed the application they will need to reinstall otherwise they won't get the question to install the C++ Runtime libraries.
It might be possible that you don't have the C:\Program Files (x86)\Microsoft SDKs\Windows\v8.0A\Bootstrapper\Packages folder on your system. I think you only get this folder when you install Visual Studio 2012 besides Visual Studio 2013. Feel free to edit this question if you know where you can just download the files without having to install Visual Studio 2012.
I am trying to link Qt5.0.2 to Visual Studio 2012 so I can do some GUI programming in C++ inside the Visual Studio environment. I have Downloaded and install ActivePerl and added Perl to the PATH environment variable and Create Perl file extension. I than downloaded Qt and installed it. I opened my Visual Studio Command prompt and changed to my C:Qt\Qt5.0.2 directory. Inside this directory I have a 5.0.2 folder, Tools folder, License folder, MaintenanceTool files and so on. Once inside of my C:Qt\Qt5.0.2 directory, I inserted this command: configure -debug-and-release -opensource -shared -platform win32-msvc2012. I get an error saying 'configure' is not recognized as a an internal or external command, operational program or batch file.
I have no idea what this means and what to do. I have been following my instructions from this aticle http://briolidz.wordpress.com/2012/03/07/compiling-qt-with-visual-studio-2010/
Can anyone help me with this?
Thanks
If I was you, I would follow instructions posted here http://qt-project.org/wiki/Building_Qt_5_from_Git
I have a link script that links a bunch of obj and lib files into a dll. I'm trying to do the same thing in Visual Studio, but without any luck. Problem is that the project doesn't have any source files. The project needs to take all the lib and obj files and link them to a dll.
I'm not sure you can do it from Visual Studio, but you can do it from the Visual Studio Command Prompt with a command like this:
link /OUT:"Dll.dll" /DLL obj1.obj obj2.obj lib1.lib lib2.lib
Create Makefile project. In VC++ 2010: Visual C++ - General - Makefile Project. In the Project properties open Build command line: Configuration properties - NMake - Build command line. Enter the script name here. When you execute Build command, this script is executed.
I have downloaded Visual C++ 2008 and I also have the Boost library, v. 1.44.0. How to can the Boost library be installed in C++?
I also have Visual C++ 2010.
You don't have to "install" Boost in Visual Studio. What you need is to point your IDE (in this case Visual Studio) to the folders which contain the Boost headers and the lib files (if you have built Boost - some Boost libraries are header-only, some need to be built). Take a look at Boost Getting Started for further details.
Quick start:
start your command prompt and go to the folder in which you have unzipped boost
execute bootstrap.bat
execute ".\bjam --build-type=complete stage" - this will build almost everything in Boost.
Note: make sure you have the VC++ compiler and linker in the environment variable PATH.