It's a little hard to diagnose your problem without any code, so I'll work it the other way with an example based on what you have posted.
Buttons.h
#ifndef BUTTONS_H
#define BUTTONS_H
class Buttons
{
public:
Buttons();
bool buttonPressed();
};
#endif
Buttons.cpp
#include "Buttons.h"
#include <iostream>
Buttons::Buttons()
{
std::cout << "Constructor called for Buttons\n";
}
bool Buttons::buttonPressed()
{
std::cout << "buttonPressed called for Buttons\n";
return true;
}
Character.h
#ifndef CHARACTER_H
#define CHARACTER_H
#include "Buttons.h"
class Character
{
public:
Character();
void update();
private:
Buttons fire;
};
#endif
Character.cpp
#include "Character.h"
#include <iostream>
Character::Character()
{
std::cout << "Constructor called for Character\n";
}
void Character::update()
{
std::cout << "update called for Character\n";
fire.buttonPressed();
}
main.cpp
#include "Character.h"
int main()
{
Character me;
me.update();
}
I've avoided GDK here because it hasn't got anything to do with your problem and would probably get in the way of the example. This code will compile and link cleanly as a console application.
Now, what am I doing that you aren't, or what are you doing that I'm not?