[C3861 error] Identificator not found.

I have a file "HSlider.h" it is using "Draw.h",where I defined my functions to use them .
But compiler says I havent defined them(identificator not found).I searched forums for similiar error,but it didnt help.

ERROR EXAMPLE:
Error C3861 DrawGUIBox: identifier not found
Try2 c:\users\lel\documents\visual studio 2015\projects\try2\try2\hslider.h 50
.


HSlider.h
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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
#include <string>
#include <iostream>
#include <map>
#include <iterator>
#include <conio.h>
#include "Offsets.h"

#include "Draw.h"
using namespace std;


class Button
{
public:
	void Init(float _x, float _y, float _w, float _h, int _r, int _g, int _b, int _a, int _rr, int _gg, int _bb, int _aa,int _onr,int _ong,int _onb)
	{
		x = _x;
		y = _y;
		w = _w;
		h = _h;
		r = _r;
		g = _g;
		b = _b;
		a = _a;
		rr = _rr;
		gg = _gg;
		bb = _bb;
		aa = _aa;
		onr = _onr;
		onb = _onb;
		ong = _ong;
		
	}
	void Move(float _x, float _y)
	{
		x = _x;
		y = _y;
	}
	void Update(int _bindb)
	{
		BindB = _bindb;
		DrawGUIBox(x, y, w, h, r, g, b, a, rr, gg, bb, aa);
		POINT p;
		GetCursorPos(&p);

		if ((p.x > x&&p.x<x + w&&p.y>y&&p.y < y + h))
		{
			if ((GetAsyncKeyState(VK_LBUTTON)&1 ))
			{
				On = !On;
				
			}
			
			
			
		}
		if ((GetAsyncKeyState(BindB)&1 ))
		{
			On = !On;
		}
		if (On)
		{
			DrawGUIBox(x, y, w, h, r, g, b, a, onr,ong,onb, a);
		}
		
	}
	bool Extract()
	{
		return On;
	}
	void Off()
	{
		On = false;
	}
private:
	float x;
	float y;
	float w;
	float h;
	int r;
	int g;
	int b;
	int a;
	int rr;
	int gg;
	int bb;
	int aa;
	int onr;
	int ong;
	int onb;
	int BindB;
	bool On = false;
	bool IsUP = true;
};

Draw.h

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
#pragma once
#ifndef HDRAWFUNC_H
#define HDRAWFUNC_H

#include "DirectX.h"

#pragma warning( disable : 4244 ) //remove the incoming warns
#pragma warning( disable : 4996 ) //remove the incoming warns

#include <d3dx9.h>
#include <d3d9.h>
#define D3DFVF_TL (D3DFVF_XYZRHW | D3DFVF_DIFFUSE | D3DFVF_TEX1)
#pragma comment(lib, "d3d9.lib")
#pragma comment(lib, "d3dx9.lib")
static struct D3DTLVERTEX;
void GradientFunc(int x, int y, int w, int h, int r, int g, int b, int a);
void DrawCenterLine(float x, float y, int r, int g, int b, int a);
void DrawLine(float x, float y, float xx, float yy, int r, int g, int b, int a);
void DrawCursorLine(float x, float y, float xx, float yy, int r, int g, int b, int a);
void FillRGB(float x, float y, float w, float h, int r, int g, int b, int a);
void DrawBox(float x, float y, float width, float height, float px, int r, int g, int b, int a);
void DrawGUIBox(float x, float y, float w, float h, int r, int g, int b, int a, int rr, int gg, int bb, int aa);
void DrawHealthBar(float x, float y, float w, float h, int r, int g, int b);
void DrawHealthBarBack(float x, float y, float w, float h);
void DrawGroupBox(float x, float y, float w, float h, int r, int g, int b, int a, int rr, int gg, int bb, int aa, char* title);
int DrawString(char* String, int x, int y, int r, int g, int b, ID3DXFont* ifont);
int DrawShadowString(char* String, int x, int y, int r, int g, int b, ID3DXFont* ifont);
void DrawCircle(int x, int y, float radius, int Sides, D3DCOLOR color);
D3DTLVERTEX CreateD3DTLVERTEX(float X, float Y, float Z, float RHW, D3DCOLOR color, float U, float V);
void DrawFilledCircle(int xPos, int yPos, int Radius, D3DCOLOR color);
void FillARGBTriangle(int x1, int y1, int x2, int y2, int x3, int y3, D3DCOLOR color, IDirect3DDevice9 *pDevice);
#endif 
Last edited on
Please show the EXACT error text.
ERROR EXAMPLE:
Error C3861 DrawGUIBox: identifier not found
Try2 c:\users\lel\documents\visual studio 2015\projects\try2\try2\hslider.h 50


You have declared DrawGUIBox in your draw.h file but where do you implement it? Obviously the compiler couldn't find it. Did you include all files in your project?
It is implemented in Draw.cpp. I included everything that I use in that file.
1) It doesn't appear that the header you posted matches the one you are compiling with. The error message refers to hslider.h line 50. However, the calls to DrawGUIBox() are at lines 42 and 63.

2) It certainly appears that the calls to DrawGUIBox() should be valid. The function delcaration and function calls match with the correct number and type of arguments (4 floats, 8 ints). Are you using namespaces (other than std)? Or including Button in a template?

3) Are you getting this error message on other functions in draw.h?



1)I tried to fix it myself,but no big changes.I just moved headers to .cpp(headers that could be moved)

2)No namespaces.

3)Yes,I get erorr with every function in Draw.h.
Anyone?I could use some help.Please.
It's difficult to impossible to see the problem on the screen.
Could you upload the whole project (.h / .cpp / .sln files) on dropbox or somewhere else.
There it is.I deleted unimportant files in my project,that were not connected to my errors.
https://yadi.sk/d/uOPt8pdC3Jb78o
Try to copy all the .h and .cpp into a new folder and create a new project from scratch.
File->New->Project from existing code. In this way all relevant files are automatically included into the project.
It didnt worked.I created new project,copied all files and got the same errors.
Topic archived. No new replies allowed.