Previously I was using Visual Studio, and now I'm trying to use vscode. Overall I love it, but there are a few functionalities from Visual Studio which I'm missing. Maybe the most important one is a combination of build and run. In Visual Studio when I pressed F5 to run my c++ project, it was performing a build if there were modified files in the project. I can't find that here, I have to manually do a build, then run. Am I missing something?
Thanks in advance
Related
I wanted to tinker this open source remake of the famous Claw.
Visit https://github.com/pjasicek/OpenClaw
Before I start with how I've cloned this game and tried to build it, I'm new to the open source community. I did the following things.
I cloned the repository.
Opened the project using Visual Studio 2017 Community edition and I changed the Configuration to Release and platform to Win32.
I then built the libwap solution without any errors.
Then I used CMake 3.11.0 to generate the required files for the Box2D solution and then generated it and then the Box2D build was a success.
I built the Midiproc manually and finally, I tried building the entire solution.
It threw a MSVCR120D.dll missing error and I copied all the .dlls from the game's release folder https://github.com/pjasicek/OpenClaw/releases
Now the game runs just fine when I launch it from the File explorer, but when I try to launch it from Visual Studio 2017, it throws the following error.
Check out this image:
How do I run the game from Visual Studio? Have I misconfigured the Visual Studio?
If you need any more details on what I did, please let me know.
[EDIT] I want to configure Visual Studio to be able to run the release and modify the source code so I can tinker it and try to understand how the game works internally.
I cloned the repository again and did a clean compilation of all the solutions. Turns out there was a problem when I copied/overwritten all dlls from the release build. Now, the game builds and executes fine.
Thanks for the help.
I recently did some cleaning of my drives. I decided to install visual studio 2017 after cleaning the drives up. I have been trying to continue work on my old UE4 project using the engine pulled from GitHub. I tried rebuilding the project with VS2017 which I know is not fully supported yet. I did run into quite a few problems, including the missing corecrt.h files. I reinstalled the Windows SDK to fix this.
The current problem is a new missing file called windows.h, and I believe it is missing due to the build tools looking for the wrong version of the SDK. I was wondering, has anyone else successfully integrated Visual Studio 2017 with their UE4 project after running into similar problems?
-- Edited due to poor grammar.
As I know Version 4.15 supports both Visual Studio 2015 (default) and Visual Studio 2017. If you are building the Engine from source code, you would want to open a command prompt after running Setup.bat and run the command GenerateProjectFiles.bat -2017. This will give you a Visual Studio 2017 solution for the Engine.
To use Visual Studio 2017 for projects, you can set your preference for which version projects use by going to Edit -> Editor Preferences -> General -> Source Code and choosing Visual Studio 2017 in the Source Code Editor setting.
If regenerating the Engine's VS project files doesn't help. Try regenerating your own UE4 project's VS project files.
With Visual Studio and UE4 closed, find the .uproject file, right click and select Generate Visual Studio project files.
Open the solution, make sure your UE4 game (e.g. MyProject) under the Games folder is set as the StartUp project (right click, Set as StartUp project), then try a compile.
I have this application code on the following remote server
https://svn.reactos.org/reactos/trunk/reactos/base/applications/rapps_new/
I have tried making a windows application in visual studio and adding the files to it, but it doesn't compile.
Whats the correct way to run the code?
You need to use CMake to generate a Visual Studio solution for the project. Then you will be able to import your solution into Visual Studio and build it.
I just need to compile this into a .exe so I can use it with command line.
Its just a Audio converter that converts .adx to wav, just need it for a few files and Never-compiled-anything-me is finding this a difficult endeavor, I really dont want to give up this adventure, so going to suck it up and ask for help.
I'm mainly interested in the "test" folder, according to the readme, all I need is the Test.exe.
extracted.zip contents (already moved over the .dlls as per readme)
Initially I googled the basics, got Visual Studio 2015 (latest)
loaded up the .vcxproj and Build > compile 'test.c' in Source Files, but I got an error saying I was missing or needed to install the build tool set for VC2010 (v100), so googling it I hunted down that I needed Visual Studio 2010, Now that I finally have that, getting a different error. (.vcproj)
C:\ProgramFiles(x86)\MSBuild\Microsoft.Cpp\v4.0\Platforms\Win32\Microsoft.Cpp.Win32.Targets(511,5):
error MSB8008: Specified platform toolset (v140) is not installed or
invalid. Please make sure that a supported PlatformToolset value is
selected. 1> 1>Build FAILED.
Just getting stumped left and right, could really use just a finger to point me in the right direction, not really asking for someone to compile the exe for me because I believe its better to teach a man to fish than give him a fish. Would just like to know how to solve this for now and for future.
You are trying to compile a project that specifies the use of a v140 project (Visual Studio 2015). However, you are running Visual Studio 2010.
You can try to do this though. Right-click on the project and select Properties. Under Configuration Properties -> General -> Platform Toolset, select v100. Try and compile again.
If this doesn't work, you will need to Visual Studio 2015.
I have several Visual C++ projects (.vcxproj) that we have in a Visual Studio 2013 Solution. From a clean code pull, everything builds successfully in either Visual Studio 2013 or a build script that calls MSBuild on each project in the proper order (a relic from the days of old, which we are working, slowly but surely, to replace).
We have a few issues with this. First, if we build from the build script first, and then try to debug, it says that most of the projects are out of date. This is annoying, but I think this is due to the batch file not touching something in the intermediate directory the same that Visual Studio does. I find similar problems documented at Stack Overflow and Microsoft Connect. Is there an alternative to modifying the Microsoft.CppBuild.targets file? I'd like to have a fix for this that doesn't involve manually modifying all of the developer's machines.
The primary problem is: If we build a project from within Visual Studio 2013, it will build and link successfully. However, if we then go and build the same project from the build script, we get:
OtherProject.lib(SomeObject.obj) : error LNK2011: precompiled object not linked in; image may not run [Full path to .vcxproj]
OutputFile.dll : fatal error LNK1120: 1 unresolved externals [full path to .vcxproj]
Does anyone have tips on how to figure out which precompiled object this is as well as why the Visual Studio based build could manage to figure things out? Do I need to review every library dependency, and each of their dependencies? Is there an easier/automated way to do this? One thing to note is that Visual Studio 2013 does not always get it right and fails with the same warning.
Our batch file build command is:
msbuild /nologo /maxcpucount /clp:NoSummary /p:BuildProjectReferences=false /p:Configuration=Debug /verbosity:normal ProjectDir\Project.vcxproj