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.
Related
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.
I'm trying to compile a c# .net project only using command line so that I could create a bat file to compile and run the Selenium tests. I exported the code from SVN. And I opened the command prompt and am able to restore packages using below command.
And then when I try to compile with msbuild it could not reference the dll added in through the nuget. I know in visual studio through package manager console I can use a command (update -reinstall) and make it work, but how to do this without visual studio.
==== bat file ======
REM Restore External Pacakages
nuget restore packages.config -PacakgesDirectory D:\Testproject\packages"
msbuid TestProject.sln
Basically you need to reference Msbuild executable
C:\Windows\Microsoft.Net\Framework\v4.0.30319\MSBuild.exe
OR
C:\Windows\Microsoft.Net\Framework64\v4.0.30319\MSBuild.exe
then you need to pass the .sln or .csproj file path (depends on your working folder) as parameter.
You can also specify the msbuild's targets ex. Clean, Rebuild, Build => As they exists in Visual Studio.
The final command could look like this:
Template:
{.NetFrameworkPath}\msbuild.exe {pathToSln} /t:{Build,Clean,Rebuild}
Examples
C:\Windows\Microsoft.Net\Framework64\v4.0.30319\MSBuild.exe TestProject.sln /t:Build
C:\Windows\Microsoft.Net\Framework64\v4.0.30319\MSBuild.exe TestProject.sln /t:Clean;Build
I use VC2013 to build and run a VC++ project. It works well, but in each single time I open and build the VC++ project, there will be a folder named like "Backup, Backup1, Backup2, Backup3,..." automatically generated by the VC2013. In the backup folder, there is just a ".sln" file.
Anyone can tell how to stop this automatical process? and what is the function of the backup folder for?
I have a driver code working for win2008 server compiled using wdk7.1.0. I converted the project to compile in visual studio 2012 with wdk8.1 and created sln and vcxproj files. I compiled successfully and generated .sys and .inf files.
My question is I have some files need to be copied to the output directory as part of build process automatically (after generating .inf and .sys files).
For wdk7.1.0, I wrote a makefile in which I executed "-copy /y src.out dest.out" and copied as part of compilation.
In wdk8.1 as I am compiling using visual studio, is there any way to execute these commands as part of build? like can I edit .sln/.vcxproj files etc etc.
Thanks in Advance
Venkatesh
You can use pre-build or post-build events properties of a project for this. You can call either a specific command or batch file to do such work.
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