undefined reference to `bbGCStackTop'?

BlitzMax Forums/BlitzMax Programming/undefined reference to `bbGCStackTop'?

JoshK(Posted 2009) [#1]
Clean install of 1.33. Built all custom module with mt enabled. Compiled app with mt enabled:
Linking:Example.mt.exe
C:/Program Files/BlitzMax/mod/brl.mod/blitz.mod/blitz.release.mt.win32.x86.a(blitz_gc.win32.x86.s.release.mt.win32.x86.o): undefined reference to `bbGCStackTop'
C:/Program Files/BlitzMax/mod/brl.mod/blitz.mod/blitz.release.mt.win32.x86.a(blitz_gc.win32.x86.s.release.mt.win32.x86.o): undefined reference to `bbGCStackTop'
Build Error: Failed to link C:/Example.mt.exe
Process complete


plash(Posted 2009) [#2]
Does it toss you over to the call(s) which crash it?
Where are they (in a module, your application's code, etc)?


JoshK(Posted 2009) [#3]
There is no further information. Only my engine module causes this. I tried importing all modules it uses, and there was no problems.


JoshK(Posted 2009) [#4]
In fact, when I try to compile my engine as a module, it compiles fine. When I try to compile the module as an executable (after commenting out the "Module" line and using "Framework" on first Import) I get the above error.


N(Posted 2009) [#5]
What are you using for Framework? Are you making sure to import Brl.Blitz and Brl.Appstub?


Brucey(Posted 2009) [#6]
Appstub and Blitz are imported for you.

interestingly, bbGCStackTop is only part of the non-threaded build.
One would think that it would be hard to reference bbGCStackTop if THREADED is defined - which it should be for an mt build.

Kind of strange.


N(Posted 2009) [#7]
Appstub and Blitz are imported for you.
Could've sworn I was able to exclude them before, but I'm probably thinking of something else.

Aside from that, no idea, sounds like you broke something that's really hard to break.


JoshK(Posted 2009) [#8]
Same result with BMX 1.32.


N(Posted 2009) [#9]
Did you do a clean install of 1.33 or are you just overwriting old files?


JoshK(Posted 2009) [#10]
I deleted the BlitzMax directory, then installed 1.33. Same with 1.32.


DStastny(Posted 2009) [#11]
The problem is you are calling GCEnter(), GCLeave() Those function are being linked in and they reference the symbol.

That comes from the source file blitz_gc.win32.x86.s

Probably should not be built into the threaded build or stubbed out.

FYI - if you ever see undefined link problem with archive couple ways you can go.

1. Look at the file name and see if the symbol is referenced in the source
2. If you dont have the source you can do objdump -a -t name.a
This will dump the symbol table and filenames from archive.

The symbol is declared extern in the asm so it does not need to be resolved unitl link time.

Doug