In function `ZN4MenuC2Ev':|
undefined reference to `GAME_FONT()'|
undefined reference to `GAME_FONT()'|
undefined reference to `GAME_FONT()'|
|undefined reference to `GAME_FONT()'|
more undefined references to `GAME_FONT()' follow|
||error: ld returned 1 exit status|
What IDE are you using?
Is it a big project?
What are libraries involved in your project?
Is your header that causes the (linker) error included by multiple source files?
Make changes to the function so that the function becomes generic, and it can potentially eliminate the problem. This is a temporary measure, so inform us if this works.
but as soon as i call the function my program dont move, its like its not moving from that line which the GAME_FONT() is called.
but in my other file, it works fine when i call the GAME_FONT();
no its not, i put std::cout in all my functions and it outputs as expected in the console but my game window wont render all of my game objects,( the game is really not freezing or not responding.)
look at this code:
1 2 3 4
Game::Game()
{
GAME_FONT();
}
the problem starts when i call the GAME_FONT.
when i removed the GAME_FONT() my game behaves fine, it renders all of my game objects.
but when i call that in other source file it behaves fine.
1 2 3 4
Menu::Menu()
{
GAME_FONT(); // my game behaves fine
}
Ok, show us the full content of your source file "Game.cpp" please.
> The problem starts when I call the GAME_FONT().
Has the function been changed or it still stays original? What does your program behave like when the function is called in Game::Game()?
What does your program behave like when the function is called in Game::Game()?
when in INMENU state (menu) it doesnt render all the text in my menu.
when in INGAME state (playing) no problem
ive put some comments in the pastebin
EDIT:
when i try to render the resume while in INMENU state, the texts are rendering (its like it triggers something) but its strange looking fonts. https://s31.postimg.org/dpcmgb00b/wqeqweqweqweqwqweqwe.jpg
the text is supposed to be "are you sure you want to exit?"