How to make my C++ project portable.
So about 15 years ago when I was at ITT Tech, I made a simple project. Basically a Mega Man 2 BGM selection menu. I ran into 2 issues when I actually presented my project.
\#1 I tried to be clever and assign the file directory to my thumb drive. At the time it was my D: drive. When I went to present the project, the computer reassigned my thumb drive's letter because the presenting computer (unbeknownst to me) already had a D: drive. So the program broke because it couldn't reference the locations of the music files it was playing. Ok no problem. I grab my own laptop and continue on.
\#2 A few weeks ago, I go back and take a look at the program. My son is taking a computer science class in high school, and I want to show him what I was doing when I started getting into programming. Kinda an inspiration, idea jogging type of thing. So I go to load the program. I start researching how to fix the reference issue. Ok I got that. Cool so I can now send my program to him, and my own high school buddy who is getting into programming himself a little bit.
They get the file and try to run the exe. They get 4 errors:
\-"The code execution cannot proceed because MSVCP140D.dll was not found. Reinstalling the program may fix this problem."
\-"The code execution cannot proceed because VCRUNTIME140D.dll was not found. Reinstalling the program may fix this problem."
\-"The code execution cannot proceed because VCRUNTIME140_1D.dll was not found. Reinstalling the program may fix this problem."
\-"The code execution cannot proceed because ucertbased.dll was not found. Reinstalling the program may fix this problem."
There's nothing to install. It's just an executable compiled by Visual Basic compiler. Maybe that's the problem. How do I get these 4 files, and how can I send them in such a way that my program can be run (or installed to run) on another computer. I'm guessing I have the files on my laptop because they came with Visual Basic? I'm not sure, but it seems like a big ask to have end users download Visual Basic just to run an exe.
https://redd.it/1plcbb1
@r_cpp
Post #24479
26