Can't run program

closed account (2E0XoG1T)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#include <iostream>
#include <string>
using namespace std;

int main()
{
	string input;
	cout << "Type spam please (: ";
	cin >> input;
	do {
	if (input == "spam") {
		cout << "\nHappy birthday Bogusz^^";
	}
	else {
		cout << "\nHappy birthday Bogusz^^";
	}
	}
	while (input != "exit");
	return 0;
}

When I try to run this program on other computers, it fails and cannot be started. Can be started on my computer only. Please help. (Be quick, his brithday is tomorow)
Last edited on
Which compiler are you using?
closed account (2E0XoG1T)
Visual C++ (Microsoft)
Right click on the project in the solution explorer, properties, C/C++>Code generation, Runtime library: "multithreaded debug" or "multithreaded". Rebuild.
closed account (2E0XoG1T)
not working. make errors in build
I believe the other computers have to have a file installed. I can't remember what one but Helios knows, sorry.
What sort of errors?
closed account (2E0XoG1T)
1>------ Build started: Project: mirelin spammer, Configuration: Debug Win32 ------
1>Linking...
1>LINK : warning LNK4098: defaultlib 'LIBCMT' conflicts with use of other libs; use /NODEFAULTLIB:library
1>spamer.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(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(_tolower.obj) : error LNK2019: unresolved external symbol __calloc_dbg referenced in function __Getctype
1>C:\Documents and Settings\Mislav\My Documents\Visual Studio 2008\Projects\mirelin spammer\Debug\mirelin spammer.exe : fatal error LNK1120: 4 unresolved externals
1>Build log was saved at "file://c:\Documents and Settings\Mislav\My Documents\Visual Studio 2008\Projects\mirelin spammer\mirelin spammer\Debug\BuildLog.htm"
1>mirelin spammer - 8 error(s), 1 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
You're supposed to choose "multithreaded debug" if you're compiling for debug, which you are.
Topic archived. No new replies allowed.