How do I alter the full path of visual studio project so I can use it on multiple computers? - c++

So for a class we have a couple of programs where we are using opengl. To make setup easier we started by cloning glitter https://github.com/Polytonic/Glitter. I then compliled it according to the instructions for visual studio 2017 and added my code to the project I am working on. I did this on my desktop computer but saved the files in onedrive. When I open the same project on my laptop and try to build the project I get the error "the source directory D:/OneDrive/fall_2017/Glitter does not appear to contain CMakeLists.txt" and several other similar errors. On my laptop the directory to the files is C:/Users/Me/OneDrive/fall_2017/Glitter. The visual studio program lists the full path as D:/OneDrive/fall_2017/Glitter which is the path of the folder on my desktop.
Is there a way for me to change the filepath or is the issue with my cmake file? Do I have to rebuild it for every computer I use it on? I don't know a whole lot about visual studio so I don't know what I need to change to get this to work.

Turns out I have to rebuild on every computer. Thanks to those who left comments.

Related

How to properly open a Visual Studio project?

I have a problem that will be very simple to solve but I don't know how to do it.
Scenario: I want to run an emulator coded in C++ by a YT (javidx9) in Visual Studio. The project is here: https://github.com/OneLoneCoder/olcNES and the folder is "Part#2 - CPU"
Problem: I never use Visual Studio, so its something new for me, and my problem is that I don't know how to run the project (emulator). And I can't find any post or article on the internet about my problem. (I tried to create an empty project in VS and then copy the emulator files to the folder of my empty project and then run it, but it sent me an error that the files were not found (and its because that isn't the correct way to run the program and I don't know how to do it)).
My request: I would be very grateful if someone could explain to me how to open and run this project (the emulator) correctly in Visual Studio.
Thanks!!!
Your project does not have. sln file. You need to create new project in visual studio. Last file has main function as below. You need to run this main file(olcNes_Video1_6502.cpp)
You may need to check path of headers included from other projects.

visual studio unable to find assert.h

I'm a first year at uni and I just got my new laptop. I downloaded Visual Studio 2017 and pulled my solution repo. However, I'm having some issues because it appears that a lot of the files I had on my previous computer were not downloaded in the installation of VS. My university wifi is slow and I don't want to re-download if I don't have to. I followed the previous steps I took to download VS 2017 on my old computer. Yet, I'm getting errors like:
cannot open source file "assert.h"
cannot open source file "errno.h"
cannot open source file "float.h"
cannot open source file "corecrt.h"
cannot open source file "stddef.h"
cannot open source file "stdio.h"
(among 20+ others)
If I right-click and choose the "Open document" on the line with the error, I get the message:
File '_______.h' not found in current source file's directory or in build system path
However, if I go to my include paths, I can find files like:
cassert.h
cerrno.h
ostream.h
but none of the ones that I'm told are missing.
Mainly, I'm wondering if there is a directory with this files I just need to add to the include directory or whether I just need to admit defeat and reinstall.
Thanks for the help, I welcome editing as I'm sure I've messed things up. I'm new to this.
Cheers,
Caleb
Using VS2017 I was able to resolve this same issue by:
Right click on solution
Selecting 'Retarget Solution'
Selecting an SDK from the Windows SDK Version dropdown
Clicking OK button
Your Visual Studio 2017 installation is probably missing the C packages (they are not automatically included with the Desktop development with C++ workload).
To install it, start the Visual Studio Installer, go to Individual components, and check Windows Universal C Runtime:
I think this component is also automatically marked for installation when adding the Linux development with C++ workload.
I solved the problem by uninstalling my original installation of Visual Studio (2019 version), then reinstalling and including the workload Desktop Development with C++.
In contrast to the above solutions, I did not need (and it did not help) to add the Windows Universal C Runtime.

Minko Engine - Cannot compile

Sorry to be such a noob, but this is my first time compiling anything and i seem to have to everything correct. First i downloaded github client, then i cloned the minko SDK, then i download visual studio, then i added the variable in my system for D:\Minko\minko , and then i loaded the solution file in visual studio clicked f7 i think it was and watched it build perfect without errors (before or after i had to run the .bat file, i dont reme,ber the exact order from tutorial). Problem is i do not see any executables for running the minko studio, and when i try to open a .cpp in code blocks i get an error for the header files as well as trying to open the .cpp file in visual studio i click build for one of the tutorial examples aand nothing happens.. Sorry again and thank you in advance. Will there be a .exe any time soon? Oh, i also installed enscriptem just fine in case it was required.
Minko Studio is not part of the open source Minko SDK.
Minko Studio is actually deprecated. It might be soon replaced with a more efficient and powerful Blender plugin, but we have no release date yet.

Visual Studio 2010 C++ native debug mode resources

I am very desperate now...
I have project in Visual C++ 2010 using Qt and OpenCV. I got to phase I need to load XML file using openCV. But, I have no idea where is the working directory of my project, when run thru VS (F5). I mean, I read all config, copied desired file almost everywhere in my project folders, but it still is not seen by my EXE (OpenCV)...
What Am I doing wrong? Thanks.
right click on your project click on properties/Configuration Properties/debugging you start in whatever working directory is set to.

MSVCP100D.dll missing

When I try to debug my C++ application I get the error
The program can't start because MSVCP100D.dll is missing from your
computer. Try reinstalling the program to fix this problem.
I found someone with a similar problem here: Remote debugging C++ on the Windows Server 2008 platform with VS2010; MSVCP100D.dll missing however the solution given there doesn't seem to show up when I go to the solution properties.
Would reinstalling Visual Studio fix this problem?
Usually you don't want MSVCP100D.dll on your system. It's for debugging purposes only. If you get this error for your release build you must make sure that you didn't accidently add a 'Debug'-tagged Project Output to your setup project.
If you really need to debug your software on a remote machine, I suggest you do the following:
Create a new Setup project called 'CRTDebug100Setup' and add the following Merge Modules (found under C:\Program Files\Common Files\Merge Modules):
Microsoft_VC90_DebugCRT_x86.msm
policy_9_0_Microsoft_VC90_DebugCRT_x86.msm
Build, and deploy on your computer to be debugged!
Reinstalling Visual Studio fixed the problem.
This can also occur if Generate Debug info is not set to No
Configuration Properties -> Linker -> Debugging -> Generate Debug info
Followup on l33t's answer above (tried to revise it but it did not seem to appear).
Added later by gpicher 10 Jan 2012: I believe those .msm packages would be for a 9.x version of the DLL in question, not a 10.x version. I resolved a similar problem I had by making a setup project with Visual Studio 2010 installed on a 64 bit Windows installation, using the merge module Microsoft_VC100_DebugCRT_x86.msm in the folder C:\Program Files (x86)\Common Files\Merge Modules. There's a similar x64 version of the .msm if the application showing the error dialog is a 64 bit application. In this case a third party was providing me a debug build of their application in order to develop and test new plugin code against, so I couldn't change build settings, and wanted the debug functionality.
Find the Visual Studio 2010 install iso file.
Extract cab44.cab file from the ISO.
Then extract file "F_REDIST_DLL_APPLOCAL_msvcp100d_x86" from the .cab file using 7z.
Rename the file to msvcp100d.dll.
For x64 version. The cab file name is cab26.cab and the file name is F_REDIST_DLL_APPLOCAL_msvcp100d_x64.
For similar issue such missing msvcr*d.dll for another visual studio version. Here is the way I used to find the answer:
Find the Visual Studio ISO.
Extract all the .cab file.
7z.exe t *.cab > filelist.txt
gvim filelist.txt
searching for the interested file name. Hope this helps.