| View previous topic :: View next topic |
| Author |
Message |
|
|
Posted: Sep 08, 2009 12:44 Post subject: !!! HELP !!!: Compiler stops compiling :((... Sniff Sniff |
|
|
I'm close to finishing some source code, I was adding debugging routines with print statements in them and now suddenly the compiler won't compile the source any more (it's one big file 1463 lines) ?!? :( :( :(
(I see no obvious problem :()
(Maybe splitting source into multiple files might help ?)
Sniff Sniff Sniff ! ;) :(...
Compiler gives following error:
Command executed:
"C:\Tools\FreeBASIC\fbc.exe" "Y:\Free Basic\Tests\test battlefield executor binary file format specification\version 0.16 (debug it)\TestProgram.bas"
Compiler output:
Y:\Free Basic\Tests\test battlefield executor binary file format specification\version 0.16 (debug it)\TestProgram.o:fake:(.text+0x2898): undefined reference to `_ZN8TEVOLVER6EVOLVEEv@4'
Results:
Compilation failed
System:
FBIde: 0.4.6
fbc: FreeBASIC Compiler - Version 0.20.0 (08-10-2008) for win32 (target:win32)
OS: Windows Server 2003 (build 3790, Service Pack 2)
HEEEELLLLLPPPPPPP
(I feel like playing this song:
http://www.youtube.com/watch?v=rDfIOr1ByIc
) |
| |
|
| Back to top |
|
 |
|
|
Posted: Sep 08, 2009 13:54 Post subject: |
|
|
The error indicates you have declared a function but that function does not exists. This message is being generated by the assembler during the linking process. The function named...
`_ZN8TEVOLVER6EVOLVEEv@4' with one paramter is not found.
-Vince |
| |
|
| Back to top |
|
 |
|
|
Posted: Sep 08, 2009 14:26 Post subject: |
|
|
I have looked and looked and look but I cannot see the problem.
The full free basic source code is now available if you want to give it a looksie yourself.
(All source code is in one file called: TestProgram.bas)
For more details about this project read the text below:
Hello,
The last couple of days I've been working hard at learning the (new) Free
Basic language (and writing little test programs to try stuff out) and
working hard on a Corewars Battlefield Evolver example to get you (free
basic people) started with writing nice/good/fast/cleanly written evolvers
in free basic code.
Which can then be compiled to an executable, and ran...
Actually calling the battlefield executor from within the free basic program
isn't even necessary (I just realized this ;))
All that is needed is a little batch file that does something like:
loop:
Evolver.exe
BattlefieldExecutor.exe
goto loop
That should work just fine since both executables will read/write from/to
the file in turn.
The good news is:
1. I think I wrote some pretty decent, fast and beautifull free basic
example code which should execute lightning fast for the general case.
(There is also some battlefield resizing and warrior resizing code in there
that might execute a little bit slower but that's the price to pay for
general fast speed ! (pointers have been prevented as much as possible to
prevent any access delays ! ;))
2. The source code for the free basic evolver example is now available !
(See below for link to it !)
3. The BattlefieldExecutor.exe (executable) is now available from the
skydrive in uncompressed form (so you don't need any decompression program !
;) :))
4. Updated battlefield binary file format specification 2.01 available on
skydrive
5. Better skydrive folders for the future ! ;) :)
The bad news is:
1. The free basic compiler is crashing ?! And I don't know why... maybe
there is a typo in the evolver example code... or maybe it's a compiler
problem.
(FreeBASIC Compiler - Version 0.20.0 (08-10-2008) for win32 (target:win32))
2. The evolver example code might still be buggy with savings and loading to
and from files. Also now evolving code yet (routine is empty... just trying
to get some basic loading/generating and saving cycle going !)
(Battlefield Evolver Example version 0.17 created on 8 september 2009 by
Skybuck Flying)
3. I am slowly getting fed up with the free basic problems (redim is buggy
so I ended up not using it but costs me some time figuring that out, free
basic is still in beta, language has some inconsistencies when it comes to
arrays() and arrays[] (some say arrays[]/new[]/delete[] is just a pointer
indexing thingy... I beg to differ mtf-ers ! :);):)) I already spent much
more time on it than is reasonable ?! ;) :) I will continue spending some
more time on it trying to get it working... but if it ain't working then at
a certain point I must STOP ! ;) :)
So without further delay here is the link to the skydrive (go to corewars
folder): (Or should it be called corewar ? hmm ;))
I shall give shortest link possible to my skydrive:
http://cid-aedd0ea32d61bc86.skydrive.live.com/home.aspx
Then "nagivate" to:
Corewars->Battlefield->Executor->For windows->version 0.03
There you will find the executable.
Corewars->Battlefield->Specification->version 2.01
There you will find the specification.
Corewars->Battlefield->Evolver example->For free basic->version 0.17
(compiler failure and buggy)
There you will find the TestProgram.bas
It contains all the source code in one file !
What will I do in the near future:
I will give free basic one more/last try for now:
1. I will try to split up the source into multiple files to see if that
solves the compiler problem.
If not then I say #%$@ it !
So for you (Terry) and for you (The Free Basic development team) I play the
follwing song with a bit of humor:
http://www.youtube.com/watch?v=rDfIOr1ByIc
Enjoy the sources and the song for what it's worth ! ;)
Bye,
Sigh,
Skybuck. |
| |
|
| Back to top |
|
 |
|
|
Posted: Sep 08, 2009 15:04 Post subject: |
|
|
This function does not exists...
vEvolver.Evolve()
It is declared, but has no actual function written.
-Vince |
| |
|
| Back to top |
|
 |
|
|
Posted: Sep 08, 2009 19:30 Post subject: |
|
|
Indeed.
I did write that empty routine before, and it was there up to version 0.16 and even version 0.17. I was injecting DisplayDebugInfo method for each UDT... and I think I accidently cut away the empty Tevolve... without noticing it.
Since I truely believed I wrote this function I was so sure that I was blinded by it lol.
Also it's kinda crazy because it almost has the same name as the constructor Tevolver
vs
sub Tevolver.Evolve
So when I saw that warning message I thought I must have made a typo somewhere... maybe in the constructor ?
So I started searching everywhere but couldn't find anything.
I never noticed there wasn't and Evolve routine ?!
Also the compiler didn't really warn for it... well not in an understandable way... though in a way it did a bit...
The biggest problem was the compiler/ide didn't jump to the line where it would be missing...
If for example it jumped to the interface/header section on Tevolver.Evolve which is there ! Then I would have understood what the problem was...
But now me being used to such functionality I was starieing at the woods, and didn't see the trees :)
So I'm analyzing what went wrong because this is very rare for me.
I very very very very rarely need somebody else to give it a fresh look.
(At least in Delphi and such ;) :))
You had a fresh look so you found it ! =D
And I thank you for that ! BIG THANKS.
Sigh.
To bad it's not a real compiler problem LOL. Then I could have had a good excuse LOL.
Now I have to go at it again LOL.
But it's good... but now I have to go explain to others that I will have to go at it again LOL.
BYE |
| |
|
| Back to top |
|
 |
|
|
|
| Back to top |
|
 |
|