W
Wiz
Guest
I was following this tutorial and I can't make my test mod compile after adding a weapon_killer.cpp.. the error it gives me are the following:
Linking...
weapon_killer.obj : error LNK2005: "int __cdecl ServerClassInit<struct DT_WeaponPistol::ignored>(struct DT_WeaponPistol::ignored *)" (??$ServerClassInit@Uignored@DT_WeaponPistol@@@@YAHPAUignored@DT_WeaponPistol@@@Z) already defined in weapon_pistol.obj
weapon_killer.obj : error LNK2005: "int DT_WeaponPistol::g_SendTableInit" (?g_SendTableInit@DT_WeaponPistol@@3HA) already defined in weapon_pistol.obj
weapon_killer.obj : error LNK2005: "class SendTable DT_WeaponPistol::g_SendTable" (?g_SendTable@DT_WeaponPistol@@3VSendTable@@A) already defined in weapon_pistol.obj
weapon_killer.obj : warning LNK4006: "int __cdecl ServerClassInit<struct DT_WeaponPistol::ignored>(struct DT_WeaponPistol::ignored *)" (??$ServerClassInit@Uignored@DT_WeaponPistol@@@@YAHPAUignored@DT_WeaponPistol@@@Z) already defined in weapon_pistol.obj; second definition ignored
weapon_killer.obj : warning LNK4006: "int DT_WeaponPistol::g_SendTableInit" (?g_SendTableInit@DT_WeaponPistol@@3HA) already defined in weapon_pistol.obj; second definition ignored
weapon_killer.obj : warning LNK4006: "class SendTable DT_WeaponPistol::g_SendTable" (?g_SendTable@DT_WeaponPistol@@3VSendTable@@A) already defined in weapon_pistol.obj; second definition ignored
or basically in other words it compiles perfectly but it doesn't link. I figured out I need a weapon_killer.obj somewhere, but I don't see that stated anywhere in the tutorial.. can't seem to figure out where exactly the problem is.. any suggestions are well accepted :E
Linking...
weapon_killer.obj : error LNK2005: "int __cdecl ServerClassInit<struct DT_WeaponPistol::ignored>(struct DT_WeaponPistol::ignored *)" (??$ServerClassInit@Uignored@DT_WeaponPistol@@@@YAHPAUignored@DT_WeaponPistol@@@Z) already defined in weapon_pistol.obj
weapon_killer.obj : error LNK2005: "int DT_WeaponPistol::g_SendTableInit" (?g_SendTableInit@DT_WeaponPistol@@3HA) already defined in weapon_pistol.obj
weapon_killer.obj : error LNK2005: "class SendTable DT_WeaponPistol::g_SendTable" (?g_SendTable@DT_WeaponPistol@@3VSendTable@@A) already defined in weapon_pistol.obj
weapon_killer.obj : warning LNK4006: "int __cdecl ServerClassInit<struct DT_WeaponPistol::ignored>(struct DT_WeaponPistol::ignored *)" (??$ServerClassInit@Uignored@DT_WeaponPistol@@@@YAHPAUignored@DT_WeaponPistol@@@Z) already defined in weapon_pistol.obj; second definition ignored
weapon_killer.obj : warning LNK4006: "int DT_WeaponPistol::g_SendTableInit" (?g_SendTableInit@DT_WeaponPistol@@3HA) already defined in weapon_pistol.obj; second definition ignored
weapon_killer.obj : warning LNK4006: "class SendTable DT_WeaponPistol::g_SendTable" (?g_SendTable@DT_WeaponPistol@@3VSendTable@@A) already defined in weapon_pistol.obj; second definition ignored
or basically in other words it compiles perfectly but it doesn't link. I figured out I need a weapon_killer.obj somewhere, but I don't see that stated anywhere in the tutorial.. can't seem to figure out where exactly the problem is.. any suggestions are well accepted :E