Re: Question from begginer
The different versions of Visual C++ ship with different versions of the C Run Time. You can think of this as a library of rudimentary program functionality not related to the operating system.
Since VS 2010 is relatively new, your friend likely does not have it installed on his or her computer. This is even more likely to be true regardless of vintage if you sent your friend a debug build.
You can either redistribute the library with your program (see http://msdn.microsoft.com/en-us/library/8kche8ah.aspx) or link to the library statically. The latter option is available in your project settings. (I don't have a convenient way to direct you to the exact spot in the settings right now but the second posting in this discussion, http://www.eggheadcafe.com/software/...rotecorre.aspx, should help you find it.
The errors in the other compiler are probably a different issue.
Re: Question from begginer
Could someone please explain me how can I install a particular Visual C++ DLL in the same folder as the application? So other people who don't have C++ installed on their computer can run my program?
Re: Question from begginer
just give them the dll along with your exe in the same folder or aks them to put that dll in C:/windows/system
Re: Question from begginer
Quote:
Originally Posted by
vcdebugger
just give them the dll along with your exe in the same folder or aks them to put that dll in C:/windows/system
Well i don't have any dll, i was reading something about it but I still don't know what to do. I know i got to have dll in the same folder as the exe but problem is, I don't know how to make that dll and what should i write in code.
Re: Question from begginer
Perhaps post #14 in this thread will lead you in the right direction.
Hope that helps.
Re: Question from begginer
Quote:
Originally Posted by
krmed
Perhaps post #14 in
this thread will lead you in the right direction.
Hope that helps.
Thanks for your reply, but I would rather make an dll and put it in the same folder as my exe file so person who opens it doesn't need to install some package of dlls in their system32 folder. I read about that on MSDN but I'm to new to c++ to understand what they wrote there.
Re: Question from begginer
The posts I pointed you to allow you to simply distribute the files without the user having to install the DLL package - they are simply copied to the application directory. This way there are no DLLs added to the Windows (system32) folder, or anyplace other than your application folder.
Re: Question from begginer
harkoslav, if you have built your .exe using .net studio then ask you friend to install framework on this pc..
Re: Question from begginer
Okay, my friend got his net.framework installed and its still not working.
I also looked at post #14 which krmed gave me and I tried to use NON DLL options "(Project Properties ->Configuration properties ->C++ ->Code generation : Runtime Library (Set this to use Non DLL versions /MT Or /MTd) "
I tried /MT and /MTd but only thing that i've got was bunch of errors and I couldn't compile my program.
Re: Question from begginer
I don't know if you followed the link in the post I referred you to, but take a look at posts #14 and # 17 in this thread.
Good luck.
Re: Question from begginer
Hi, the problem here is that your friend hasn't the runtime files required by VC executables to run. To fix this, simply go to the microsoft downloads site and search for 'VC2010 runtime redistributable package', download and install on the target machine. This will work only for Release builds and not for Debug ones (never distribute Debug executables).
Quote:
Originally Posted by
vcdebugger
just give them the dll along with your exe in the same folder or aks them to put that dll in C:/windows/system
This is a really bad idea since VC runtimes use those dlls as Windows Side-By-Side Assemblies, and you should never distribute assemblies to the system folder or you may end up with a messed-up system. Check this for more info on sxs assemblies: http://msdn.microsoft.com/en-us/libr...8VS.85%29.aspx
Hope this helps you.
Regards.
Re: Question from begginer
Quote:
Originally Posted by
bioHzrdmX
Hi, the problem here is that your friend hasn't the runtime files required by VC executables to run. To fix this, simply go to the microsoft downloads site and search for 'VC2010 runtime redistributable package', download and install on the target machine. This will work only for Release builds and not for Debug ones (never distribute Debug executables).
This is a really bad idea since VC runtimes use those dlls as Windows Side-By-Side Assemblies, and you should never distribute assemblies to the system folder or you may end up with a messed-up system. Check this for more info on sxs assemblies:
http://msdn.microsoft.com/en-us/libr...8VS.85%29.aspx
Hope this helps you.
Regards.
Thanks again mate! =) My friend made it work with runtime redistributable package!
Re: Question from begginer
Personally, I would have just linked the runtime statically: Project properties -> C/C++ -> Code Generation -> Runtime Library, set it on one that doesn't say "DLL".
Re: Question from begginer
Quote:
Originally Posted by
harkoslav
Okay, my friend got his net.framework installed and its still not working.
I know you have this problem resolved, but I just wanted to point out that the .Net framework has absolutely nothing to do with native C++.
You can statically link as Lindley suggested, or give out the vcredistributable package.