Creating Custom resource in c++ doesn't shown

Godot Version

4.2.1 windows using visual studio c++ 2022


hello all
I’m trying to create custom resource in c++ all complies and all , but it doesn’t shown in the godot editor when i try to add it , what am i doing wrong ? i saw this post also :
looks like it similar to what i do :
this is my code :

# ifndef WEAPONS_H_
#define WEAPONS_H_
#include <godot_cpp/classes/resource.hpp>
namespace fpsgame {
class Weapons : public godot::Resource
GDCLASS(Weapons, godot::Resource)
Weapons() {};
virtual ~Weapons() {};
void set_name(const godot::StringName p_name);
godot::StringName get_name() const;
static void _bind_methods();
godot::StringName name;


#include "weapons.h"
namespace fpsgame {
void Weapons::_bind_methods()
godot::ClassDB::bind_method(godot::D_METHOD("get_name"), &Weapons::get_name);
godot::ClassDB::bind_method(godot::D_METHOD("set_name", "p_name"), &Weapons::set_name);
godot::ClassDB::add_property("Weapons", godot::PropertyInfo(godot::Variant::STRING_NAME, "name"), "set_name", "get_name");

void Weapons::set_name(const godot::StringName p_name)
this->name = p_name;
godot::StringName Weapons::get_name() const
return this->name;

But still when running the editor it does not shown

rich text editor image