LINK 1109 error?

So Ive been dealing with some errors, and I finally got rid of one but the moment I did I got two errors. Managed to fix one, but I'm stuck with a link 1109 error, and this actually happened earlier before and I don't know what exactly it is that I did that prevented it from coming back. Any ideas and anyone know why this is happening? Also, I was reading through the error and it's not saying it's in a certain file, rather it's the entire project, even so I'm only inserting the source.cpp file.


#include <iostream>
#include <string>
#include "Weapons.h"
#include "Enemies.h"
#include "Consumables.h"

int PlayerLevel = 2;
int healthpotcount = 0;
int money = 0;
std::string name;
std::string choice1;
char choice2;
std::string choice3;
std::string choice4;
//will be completed once all variables and classes are completed.
void shopkeep(int money, int invspace, std::string name, std::string classname);

int main()
{
long PlayerLevel = 50;
int strength = 5;
int numofattackonweapon;
swords TrainingSword;
TrainingSword.setSwordDamage(strength, 10);
TrainingSword.setSwordDurability(50);
TrainingSword.setSwordLength(2);
landenemy Muural;
Muural.SetEnemyDamage(6, 4, 3, PlayerLevel);
std::cout << "Muural deals " << Muural.GetEnemyDamage() << " damage at level 2." << std::endl;
std::cout << TrainingSword.getSwordWeight() << std::endl;
std::cin >> money;
return 0;
}


//shop function
void shopkeep(int health, int money, int invspace, std::string name, std::string classname)
{
std::cout << "Hello " << name << ", do you wish to purchase items or sell your belongings off? You have " << money << " money to spend." << std::endl;
std::cin >> choice1;
if (choice1 == "purchase")
{
if (classname == "knight")
{
std::cout << "We have the following items available for you to purchase: (1.) Armor plates(costs 60 gold), (4.) Steel armor(costs 150 gold), (3.) Health potions(costs 40 gold)." << std::endl;
std::cin >> choice2;
switch (choice2)
{
case 1:
if (money >= 60)
{
std::cout << "Thank you for purchasing our armor. You have " << money << " money to spend." << std::endl;
money = money - 60;
}
}
}
if (classname == "archer")
{
std::cout << "We have the following items available for your purchase: (1.) Leather padding(costs 50 gold), (2.) Arrows for you to use(20 gold), (3.) Health potions(40 gold)." << std::endl;
}
}
else if (choice1 == "sell")
{

}
else
{
std::cout << "Okay, I don't understand what you just said. Let's try this again." << std::endl;
shopkeep(money, invspace, name, classname);
}
}
Based on msdn, https://msdn.microsoft.com/en-us/LIbrary/207183ye(v=vs.90).aspx

Check your library/header file and see if you did anything wrong with it.
Hello moosyman,

As this link suggests it might be a virus program interfering with the compile.
http://stackoverflow.com/questions/11252740/linker-error-lnk1109

I did not read everything there, but I did a Google search on c++ lnk1109.

Hope that helps,

Andy
Since you did not provide your header files, I can't compile your program to try and duplicate your problem.

However, as Handy Andy suggested, this may be related to anti-virus software.

I occasionally have similar problems with anti-virus software keeping open the output file from the link when I am trying to recompile. I get around it by renaming the output file of the link. Eventually the anti-virus software closes the original output file and I can delete it.

Try turning off your anti-virus software to see if the problem goes away.
Topic archived. No new replies allowed.