Acymetric

Hi, I am having trouble with a c++ windows 32 console app.

It builds fine, but when I run it in debug it gives me an error that

"This application has failed to start because MSVCP80D.dll was not found. Re-installing the application may fix this problem."

I have tried this on a couple different computers with the same results, I checked and both have the "missing" file.

Other programs that I have made, what could the problem here be

here is the code:

Code Block#include <iostream>
#include <string>
#include <ctime>
#include <cstdlib>
using namespace std;

int main()
{
cout.setf(ios::fixed);
cout.setf(ios::showpoint);
cout.precision(2);


double averageTransaction, averageItems, cost, subTotal, purchaseTotal;

int i, barcode, quantity, userNameSwitch, customerTotal, transactionItemTotal, itemTotal, transactionTotal;

string size, userInput, run, userName, password;

userInput = "lain";

i = 0;
customerTotal = 0;

while (userInput != "tamat")
{

while (i == 0)
{
cout << "Username: ";
cin >> userName;
cout << "\nPassword: ";
cin >> password;

if (userName == "o-fritz")
userNameSwitch = 0;
else if (userName == "j-doe")
userNameSwitch = 1;
else if (userName == "j-smith")
userNameSwitch = 2;

switch (userNameSwitch)
{
case 0:

if (password == "asmara")
i = 7;
else
{
system ("cls");
cout << "Invalid username or password";
}
break;

case 1:


if (password == "tiamo")
i = 7;
else
{
system ("cls");
cout << "Invalid username or password";
}
break;

case 2:


if (password == "liebe")
i = 7;
else
{
system ("cls");
cout << "Invalid username or password";
}
break;
default:
system ("cls");
cout << "Invalid username or password";
break;
}

}


system ("cls");
cout << "Quick Stop Cafe\n\n";
cout << "Customers served: " << customerTotal;
cout << "\nType 'berhenti' to pause, 'lain' to log out, or 'tamat' to shut down.";
cout << "\n\n 000001 - Regular Coffee\n 000002 - Cappuccino\n 000003 - Mocha\n 000004 -" <<
"Latte\n 000005 - Tea\n 000006 - Carrot Cake\n 000007 - Cheese Cake\n 000008" <<
"- Chocolate Cake\n 000009 - Bagel\n 000010 - Doughnut\n";
cout << "Enter command or barcode: ";
cin >> userInput;

while (userInput != "tamat" && userInput != "lain" && userInput != "berhenti")
{
if (userInput == "000001")
barcode = 1;
else if (userInput == "000002")
barcode = 2;
else if (userInput == "000003")
barcode = 3;
else if (userInput == "000004")
barcode = 4;
else if (userInput == "000005")
barcode = 5;
else if (userInput == "000006")
barcode = 6;
else if (userInput == "000007")
barcode = 7;
else if (userInput == "000008")
barcode = 8;
else if (userInput == "000009")
barcode = 9;
else if (userInput == "000010")
barcode = 10;
else
barcode = 11;

switch (barcode)
{
case 1:
system ("cls");

cout << "What size Coffee ";
cin >> size;

i = 0;

while (i = 0)
{
i = 3;

if (size == "s")
cost = .99;
else if (size == "m")
cost = 1.19;
else if (size == "l")
cost = 1.29;
else
{
cout << "Invalid size, choose again";
i = 0;
}
}

do
{
cout << "Enter quantity: ";
cin >> quantity;

if (quantity > 0)
{
subTotal = subTotal + cost * quantity;
i = 0;
}
else
{
cout << "Please enter quantity larger than 0";
i = 1;
}
}
while (i == 1);


subTotal = subTotal + cost * quantity;

cout << "000001 - Item\nItems in order: " << transactionItemTotal;
cout << "Subtotal: $" << subTotal;

break;

case 2:
system ("cls");

cout << "What size Cappuccino ";
cin >> size;

i = 0;

while (i = 0)
{
i = 3;

if (size == "s")
cost = 2.59;
else if (size == "m")
cost = 2.89;
else if (size == "l")
cost = 3.19;
else
{
cout << "Invalid size, choose again";
i = 0;
}

}
do
{
cout << "Enter quantity: ";
cin >> quantity;

if (quantity > 0)
{
subTotal = subTotal + cost * quantity;
i = 0;
}
else
{
cout << "Please enter quantity larger than 0";
i = 1;
}
}
while (i == 1);


subTotal = subTotal + cost * quantity;

cout << "000001 - Item\nItems in order: " << transactionItemTotal;
cout << "Subtotal: $" << subTotal;

break;

case 3:
system ("cls");

cout << "What size Mocha ";
cin >> size;

i = 0;

while (i = 0)
{
i = 3;

if (size == "s")
cost = 2.99;
else if (size == "m")
cost = 3.59;
else if (size == "l")
cost = 4.19;
else
{
cout << "Invalid size, choose again";
i = 0;
}

}
do
{
cout << "Enter quantity: ";
cin >> quantity;

if (quantity > 0)
{
subTotal = subTotal + cost * quantity;
i = 0;
}
else
{
cout << "Please enter quantity larger than 0";
i = 1;
}
}
while (i == 1);


subTotal = subTotal + cost * quantity;

cout << "000001 - Item\nItems in order: " << transactionItemTotal;
cout << "Subtotal: $" << subTotal;

break;


case 8:
system ("cls");

cost = 2.89;
do
{
cout << "Enter quantity: ";
cin >> quantity;

if (quantity > 0)
{
subTotal = subTotal + cost * quantity;
i = 0;
}
else
{
cout << "Please enter quantity larger than 0";
i = 1;
}
}
while (i == 1);


subTotal = subTotal + cost * quantity;

cout << "000001 - Item\nItems in order: " << transactionItemTotal;
cout << "Subtotal: $" << subTotal;

break;

case 9:
system ("cls");

cost = .99;
do
{
cout << "Enter quantity: ";
cin >> quantity;

if (quantity > 0)
{
subTotal = subTotal + cost * quantity;
i = 0;
}
else
{
cout << "Please enter quantity larger than 0";
i = 1;
}
}
while (i == 1);


subTotal = subTotal + cost * quantity;

cout << "000001 - Item\nItems in order: " << transactionItemTotal;
cout << "Subtotal: $" << subTotal;

break;

case 10:
system ("cls");

cost = .59;
do
{
cout << "Enter quantity: ";
cin >> quantity;

if (quantity > 0)
{
subTotal = subTotal + cost * quantity;
i = 0;
}
else
{
cout << "Please enter quantity larger than 0";
i = 1;
}
}
while (i == 1);


subTotal = subTotal + cost * quantity;

cout << "000001 - Item\nItems in order: " << transactionItemTotal;
cout << "Subtotal: $" << subTotal;

break;

default:
system ("cls");
cout << "Invalid barcode, please check and reenter.";
break;
}
}
}
}


I don't think I have it quite to where it will function the way I want it to, but it still shouldn't return that error. Thanks for the help!



Re: Visual C++ General Missing MSVCP80d dll file?

scor7910

Hi~

I think your code has no problem.

Actually, I didn't ever got an error like yours.

But. I found many answers about your question on this forum.

Woud you try search for "MSVCP80d dll" on msdn

Good Luck~~






Re: Visual C++ General Missing MSVCP80d dll file?

crescens2k

This library is the debug version of the CRT. It is looking for this because you have built a debug version of the application. If you want to distribute your program then you must compile it as release and then use the VC++ redistributable package to distribute the runtime.

The debug runtime is not for redistribution only for testing.






Re: Visual C++ General Missing MSVCP80d dll file?

Jangid

Use MFC in as a Static Library and try if you dont want to use static library then distribute VC++ redistributable package

Kind Regards

Manoj Jangid






Re: Visual C++ General Missing MSVCP80d dll file?

Ben Anderson MSFT

See this post:

http://blogs.msdn.com/vcblog/archive/2007/10/12/how-to-redistribute-the-visual-c-libraries-with-your-application.aspx

For your options to redistribute the VC libraries. On your main dev box, if you have VC installed, you shouldn't be seeing this problem.

The other possibility is that you are missing a manifest for your exe. Make sure you leave the *.exe file in the same place as the *.exe.manifest file or make sure that the manifest is getting embedded in your exe.