• 0

What this compilation error means? I cannot solve it


Question

I am making a fairly simple tictactoe game with Borland C++ Builder. But it is the first time i am making a project alone with it. I have worked with it for a few months, before, but in projects that were working. I just adjusted or added some kinds of things. My project is a win32bit thing.

 

First, i had an issue with the "onClick" event function. The 9 buttons (the game positions where we play) must have 9 different position. When i drawed the dialog, i copied an empty and basic button to have them 9. But after doing this, if i double clicked the "onClick" event of one of them, and created a new function, this function were "magically" given to all 9 buttons. And worse than that: if i went to the second button and change it in it, wanting in it alone, all the other 8 were changed 2. I had to empty the events of each button, and then create the event function. I will never reuse things in the dialogs, just because they have size or other properties that may take a bit of time to adjust. But this problem is done. I compiled the code, which did not do anything, at this time, but it worked.

 

And i kept working things to make my game algorithm implemented. After each set of things i did, i CTRL+F9 to check if anything was missed or written wrong.

 

The last thing i am trying to do is to make the "terminou" function work. It is a function which is called after each move, and it checks if the game ended with a winner, or in a draw. The code had a lot of strange warnings, first. I found it strange. But after fiddling it with my favorite text editor, Vim, i found the culprit: i accidentally delete, without noticing, the closing braces of a function which is before all the onClick functions, for the buttons.

 

All the warnings are fixed, i want to make it compile, and maybe run or run as debug it a little, before i continue. But this warning is strange to me:

 

TjogoDaVelha:: referenced from C:\[...]\VELHA.OBJ

 

"Velha" is the name of my project. It has 4 files:   velha002.cpp  velha002.dfm  velha002.h    velha.mak
 

In a previous situation with this project, i had a nonsense compiling error about functions that did not exist. But the name was a function that i tested for an event in all the button, but after the test, i removed it from all their properties. The compilation stopped working! After muuuuuuuuuch time trying various "magical rituals", i discovered the functions declarations were removed from the dialog properties and from the cpp file, but *not* from the header file. They were there... laughing at me. Humph.  Now, i work with the header file opened, and i always check it.

 

So, can you help me finding what is causing the error above?

1 answer to this question

Recommended Posts

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.