fatal error LNK1120: 2 unresolved externals

Hi i try to compile code but it appear ,can someone help me

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
 /*FlyingStrings.h
Useable to get out messages from units
Used to output Bounty messages
*/

#ifndef FLYINGSTRINGS_H
#define FLYINGSTRINGS_H

#include "../Ares.CRT.h"
#include "../Ares.h"
#include <TacticalClass.h>

class FlyingStrings{
private:
	struct Item {
		CoordStruct coords;
		int created;
		wchar_t text[0x20];
		DWORD color;

		bool operator == (Item const &t) const {
			return false;
		}
	};
	
	static const int Duration = 75;
	
	static DynamicVectorClass<Item> data;

	static void Remove(int idx) {
		data.RemoveItem(idx);
	}
	
public:
	static void Add(const wchar_t* text, CoordStruct* coords, DWORD color) {
		// "remember" a text.
		Item item;
		item.coords = *coords;
		item.created = Unsorted::CurrentFrame;
		item.color = color;
		AresCRT::wstrCopy(item.text, text, 0x20);
		
		data.AddItem(item);
	}
	
	static void UpdateAll() {
		for(int i=data.Count-1; i>=0; --i) {
			if(Item* pItem = &data[i]) {
				Point2D point;
				TacticalClass::Instance->CoordsToClient(&pItem->coords, &point);
				int pointX, pointY;

				if(Unsorted::CurrentFrame > pItem->created + Duration - 70) {

					pointX = point.X;
					pointY = point.Y - (Unsorted::CurrentFrame - pItem->created);
					DSurface::Hidden_2->DrawText(pItem->text, pointX, pointY, pItem->color);
				}
				else{
					pointX = point.X;
					pointY = point.Y;
					DSurface::Hidden_2->DrawText(pItem->text, pointX, pointY, pItem->color);
				}

				if(Unsorted::CurrentFrame > pItem->created + Duration || Unsorted::CurrentFrame < pItem->created) {
					Remove(i);
				}
			}
		}
	}
};

#endif


this message
Hooks.obj : error LNK2019: unresolved external symbol "public: void __thiscall WeaponTypeExt::ExtData::GiveMoney(class BulletClass *)" (?GiveMoney@ExtData@WeaponTypeExt@@QAEXPAVBulletClass@@@Z) referenced in function _BulletClass_Fire
BountyClass.obj : error LNK2001: unresolved external symbol "private: static class DynamicVectorClass<struct FlyingStrings::Item> FlyingStrings::data" (?data@FlyingStrings@@0V?$DynamicVectorClass@UItem@FlyingStrings@@@@A)
C:\Users\***\Desktop\Ares builded\Ares.dll : fatal error LNK1120: 2 unresolved externals
Last edited on
All google searches say that you must have created the wrong type of project. That error has nothing to do with your code.
i think no , i found first problem
i already declare void func but the original void func is not written yet
so i write it already

the second is the flyingstrings , and i didn't know the problem there yet :)

and btw thanks for your answer :D
Why is FlyingStrings::data static?

Where did you initialize this static member variable?
Topic archived. No new replies allowed.