Program works on my pc fine but it doesnt run on other pcs

So i built a programme and I can run it whitout any problems but whe i run it on another pc it shows error "the application has failed to start because the application configuration is incorrect"
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
#include "stdafx.h"
#include <iostream>
#include <math.h>

using namespace std;

int _tmain(int argc, _TCHAR* argv[])
{

	long double x1,x2,a,b,c,d;
		cout << "enter a >";
		cin >> a;
		cout << endl << "enter b >";
		cin >> b;
		cout << endl << "enter c >";
		cin >> c;

 d=(b*b)-(4*a*c);
if (d>0){
x1 = (-b + sqrt (d)) / (2 *a);
x2 = (-b - sqrt (d)) / (2 *a);
cout << "pirmaa sakne ir  " << x1 << "  otraa sakne ir  " << x2 << endl;
cin.get();
cin.get();
cin.get();
	return 0;}

	 else if (d==0) {
x1 = (-b - sqrt (d)) / (2 *a);
cout << "atbilde ir tikai viena un taa ir  " << x1 << endl;
cin.get();
cin.get();
cin.get();
	return 0;
		 }

		 else if (d<0) {
cout << "saknu nav" << endl;
cin.get();
cin.get();
cin.get();
	return 0;
		 }


		 else if (b==0){
x1=sqrt(-c/a);
x2=sqrt(c/a);
cout << "pirmaa sakne ir  " << x1 << "  otraa sakne ir" << x2 << endl;
cin.get();
cin.get();
cin.get();
	return 0;
		 }


		 else if (c==0) {
x1=0;
x2=b/a;
cout << "pirmaa sakne ir  " << x1 << "  otraa sakne ir" << x2 << endl;
cin.get();
cin.get();
cin.get();
return 0;
}

		 else if (c==0,b==0){
cout << "atbilde ir 0" << endl;
cin.get();
cin.get();
cin.get();
	return 0;
		 }

}

By the way I tried to change runtime library to multi treated but it still doesnt work on other pc`s but when i change it to multi treated debug it throws me errors
1>------ Build started: Project: kvadr1, Configuration: Debug Win32 ------
1>Compiling...
1>stdafx.cpp
1>Compiling...
1>kvadr1.cpp
1>Linking...
1>LINK : warning LNK4098: defaultlib 'LIBCMT' conflicts with use of other libs; use /NODEFAULTLIB:library
1>libcpmtd.lib(xmbtowc.obj) : error LNK2001: unresolved external symbol __CrtDbgReportW
1>kvadr1.obj : error LNK2019: unresolved external symbol __CrtDbgReportW referenced in function "protected: virtual char const * __thiscall std::ctype<char>::_Do_widen_s(char const *,char const *,char *,unsigned int)const " (?_Do_widen_s@?$ctype@D@std@@MBEPBDPBD0PADI@Z)
1>libcpmtd.lib(cin.obj) : error LNK2001: unresolved external symbol __CrtDbgReportW
1>libcpmtd.lib(cout.obj) : error LNK2001: unresolved external symbol __CrtDbgReportW
1>libcpmtd.lib(stdthrow.obj) : error LNK2001: unresolved external symbol __CrtDbgReportW
1>libcpmtd.lib(xdebug.obj) : error LNK2019: unresolved external symbol __malloc_dbg referenced in function "void * __cdecl operator new(unsigned int,struct std::_DebugHeapTag_t const &,char *,int)" (??2@YAPAXIABU_DebugHeapTag_t@std@@PADH@Z)
1>libcpmtd.lib(xmbtowc.obj) : error LNK2001: unresolved external symbol __malloc_dbg
1>libcpmtd.lib(xdebug.obj) : error LNK2019: unresolved external symbol __free_dbg referenced in function "void __cdecl operator delete(void *,struct std::_DebugHeapTag_t const &,char *,int)" (??3@YAXPAXABU_DebugHeapTag_t@std@@PADH@Z)
1>libcpmtd.lib(xmbtowc.obj) : error LNK2001: unresolved external symbol __free_dbg
1>libcpmtd.lib(_tolower.obj) : error LNK2019: unresolved external symbol __calloc_dbg referenced in function __Getctype
1>C:\Documents and Settings\ivars\My Documents\Visual Studio 2008\Projects\kvadr1\Debug\kvadr1.exe : fatal error LNK1120: 4 unresolved externals
1>Build log was saved at "file://c:\Documents and Settings\ivars\My Documents\Visual Studio 2008\Projects\kvadr1\Debug\BuildLog.htm"
1>kvadr1 - 11 error(s), 1 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

Also I think i should say that I am using Visual c++ 2008 express edition. And another question how is my english? :D
I'm not too sure, but I came across this:

http://social.msdn.microsoft.com/Forums/en-US/vcgeneral/thread/36971526-95f3-4a9f-a601-1843c86332c1

Your english is fine :).
http://cplusplus.com/forum/windows/13810/

Next time you have an error like that do a search using the entire error message. You can find a lot of threads that are related. In fact do the search again yourself if that link doesn't contain enough info. There are a bunch.
Rycul (29) Feb 14, 2010 at 2:08pm
I had the same problem a while ago with a program I wrote. What I did was change the compiler settings. Go to Build -> Configuration Manager -> Then change the Active Solution Configuration from Debug to Release from the dropdown-menu. It worked for me if I recall correctly. But I'm sure there are more things that can give you the same error so I don't guarantee you that this will work for you as well.

EDIT: Phew, I'm still a bit sleepy I guess. You can also just change Debug to Release from the dropdown-menu on the standard toolbar. (Atleast if you have that enabled) It's right next to the green 'Start debugging' arrow. If you dont have this enabled you can enable it by going to View -> Toolbars -> Standard.
Last edited on Feb 14, 2010 at 2:12pm


this one helped me. Btw thx for fast replyes
Last edited on
Topic archived. No new replies allowed.