C++ program not running on other computers [closed] - c++

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question appears to be off-topic because it lacks sufficient information to diagnose the problem. Describe your problem in more detail or include a minimal example in the question itself.
Closed 9 years ago.
Improve this question
A simple question, I have made a program that runs on my computer perfectly but not on someone else's computer. This simple question is a big headache of mine. I have read at least thousands of topics on the internet.
I tried to copy msvcp90.dll and other dll files to the target machine but that didn't work. I read an article which says you have to copy a manifest file too. Now I don't know which manifest file to copy.
I also have created my own dll file but that didn't work either.
Can anybody please help me, I'm in a big headache (I don't want to statically link the libraries, just tell me the concept of dynamic linking). Thank you.
One other thing, I have used windows.h header file in my program and a lot more header files. I am using visual studio 2008.

First, make sure you are compiling the release version of your application - typical users never have the debug c-runtime installed.
Second, you probably want to install the full c-runtime library on the client machine that corresponds to the version of Visual Studio you are using. Here's a link for the VS 2008 runtime: C Runtime Library

Related

Could anyone help me to install Intel package fortran in Mac OS Catalina? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 3 years ago.
Improve this question
I have downloaded the installation file from the link below but after finishing installation I am not seeing anything to open the application.
https://software.intel.com/en-us/fortran-compilers/choose-download
There isn't "something to open the application". You can use the compiler from a terminal or from Xcode. Instructions are at https://software.intel.com/en-us/get-started-with-fortran-compiler-macos , but in the spirit of StackOverflow I excerpt some of them here:
Before you can use this tool, you must first set the environment variables by sourcing the environment script using the initialization utility to initialize all the tools in one step:
From a terminal session, run:
source <install_dir>/bin/compilervars.sh intel64
where <install_dir> is the directory structure containing the compiler /bin directory.
By default, the path for <install_dir> isopt/intel/compilers_and_libraries_2020.<update number>.<packages number>/mac
...
Use the command below to invoke the compiler from the command line.
ifort helloworld.f90
If you want to use Xcode, see the link above for details. Keep in mind that Xcode integration is only partial - it doesn't understand module dependencies and you can't use the debugger from within Xcode.

MSI built in VS2015/Win10 4mb smaller than VS2010/Win 7 [closed]

Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 7 years ago.
Improve this question
As the title says, my MSI that is built in VS 2015 is a whole 4mb smaller than my MSI built in VS 2010. In addition to the file size difference, the Win10 installer only seems to be able to be installed on Win 8+, giving a missing DLL error on Win7. I've tried searching a number of phrases, but I can't find anything that relates to my question. Can anybody shed some light on this? Any ideas would be greatly appreciated. I can provide more information, but I'm not sure what you'd need, so let me know if you need more info.
A few comments of explanation:
MSI files are not built from scratch - they are based on a schema MSI file that's used as the starting point. If the two VS editions use different schemas you'll see different MSI files, especially if support for old stuff was deleted.
MSI files are sparse files, not continuous data streams. If the mechanism for updating the database (which is what MSI files are) is different then the file structure may be different, with less unused space in it.
MSI files contain data other than your files. There are binary files containing bitmaps, calls to detect the NET framework, C++ Dlls to call managed custom actions, all kinds of things that may be different between the two versions of Visual Studio. Any change here will change the size of the MSI file.
Is this an actual issue? I suspect that if somebody used VS 2010 and VS 2015 to generate a 100MB code file, nobody would worry if they came out as different sizes because they are different compilers with different internals.

Can't run windows app on any other machine [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question appears to be off-topic because it lacks sufficient information to diagnose the problem. Describe your problem in more detail or include a minimal example in the question itself.
Closed 8 years ago.
Improve this question
I have recently written a fairly simple code for windows app, a 2048 game, including some basics such as icon, background and stuff, 4 buttons for different directions and 4x4 array of static windows for output. The Code isn't really "nice" but as I'm still learning I find it enough since it work ( at least on my PC ). I'm using default VS13 config, haven't changed anything after I installed it and the code is written in c++.
Codes can be found here: https://www.dropbox.com/sh/15y1daq2h3jm8p7/AADp0m1EfUJo3W2z315Zgd0Wa
Now what bugs me is that the program compiles with 0 warnings or errors and works just as I intended it when I run it either via debug or from desktop on my PC, but when I upload it to dropbox and want to start lets say on laptop then it doesn't work.
Also if I try to compile the exact same code in Codeblocks I can't and there are warnings that many functions weren't declared in the scope.
Can any1 explain why is this happening and how can I fix it ?
The basic problem you are facing is that you are trying to compile the code outside of the Visual Studio environment for a VCPP code that you have written.
When you debug the code using Visual Studio, all the required files/dependencies are injected during compilation.
I'd recommend packaging the code using Visual Studio and try running the exe on your laptop.
Make sure you have the correct version of VC++ runtime environment installed on your target machine. (You can optionally also include the setup with your packaged setup.)
From here: https://stackoverflow.com/a/20890610/1477051
As you can see here, the MSVCP DLL is the platform's
implementation of the C++ Standard Library. In short what that means
is you cannot distribute your application without needing the "stuff"
that these libraries provide. All compilers regardless of platform
would need some kind of implementation of the Standard Library.
Typically this is distributed in the form of libraries.
However you can distribute your application so that the "stuff" is
built in to your program directly, rather than being shipped in a
separate DLL. In order to do this, you must statically link your
application to the Standard Library.
There are a few ways to accomplish this. One way is in Project
Settings. In "Configuration Properties" > "C/C++ Code Generation" >
"Runtime Library", choose "Multithreaded (/MT)" as opposed to
"Mutithreaded (Static)".
By the way, the "D" in "MSVCP120D.dll" you mentioned above means
"Debug." This means that you are trying to distribute a debug build of
your program. You should (almost) never do this. Distribute release
builds instead.

How to write C++ on Mac? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 2 years ago.
Improve this question
Taking my first C++ class in college. I need to download C++ and my teacher gave us a direct link to download it, but it only works on Windows. Is there a way I can format it to work on my Mac or is there a Mac-friendly version I can download?
A compiler for C++ is already built into Mac (try g++ main.cpp in terminal). If you mean an IDE for C++, use Xcode 5, available in app store.
It's developed by Apple, has git integration too if that's useful to you. Also has templates and such available to entice you to work on OS X/iOS projects, which might be a nice way in for you (I'm just starting out too, and I think that could be good).
For command-line projects though, I find it best to write in Xcode, then compile and run from the terminal. It's easier for file I/O and passing arguments to stdin IMO.
You can utilize something called Xcode IDE to write your programs on C++, I have been using that for a quite a while now, and it's definitely fun. You can find the app from free on APP store or just by clicking the link below. This is one of the many things I like about MAC.
click here to get XCODE
On Mac, since you are just starting out, use XCode. Its a pretty neat IDE with built in C++ compiler so you can write C++, compile with a click and run.
I think you kinda have the wrong idea of c++.
C++ is a programming language and what you are asking about is a development environment.
For example Xcode is such an environment. Since I also have my favorite I would use Eclipse since it is useful for many other purposes too.
Eclipse C++ Download

What is the minimum reasonably supported GCC version? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking for code must demonstrate a minimal understanding of the problem being solved. Include attempted solutions, why they didn't work, and the expected results. See also: Stack Overflow question checklist
Closed 9 years ago.
Improve this question
I have been developing a C++11 application against a modern compiler on my mac/linux, which works fine but then I tried to deploy it to a very old linux box (g++ 4.1.2: Feb 2007) and of course that's too old and the executable won't work.
This isn't surprising but now I'm wondering if there is a standard amount of time you are expected to support a compiler/standard?
I had a look around but there is no mention of this.. Should the support for a compiler version drop when the developers themselves deem it end of life and will not patch bugs?
You're the one running gcc (or g++). It's a compiler, used by developers. End-user systems may not have any version of gcc. It's glibc and libstdc++ you need to worry about. But in general, Linux does not aim for binary compatibility. Do not expect any binary executable to run properly on any other distribution/major version.
Conversely, glibc and libstdc++ are careful to work with old kernel versions, so you should be able to install (configure+make+install) the latest runtime support libraries on your Linux box, and then build your application for that.
The easiest way to do that is probably to install the same distribution and version that your target has, into a virtual machine. Then install the C++11 developer tools, and build your application.