undefined reference to `currentZ80Driver'

SGDK only sub forum

Moderator: Stef

Post Reply
tryphon
Very interested
Posts: 303
Joined: Sat Aug 17, 2013 9:38 pm
Location: France

undefined reference to `currentZ80Driver'

Post by tryphon » Wed Apr 06, 2016 2:36 pm

Hi,

I donwloaded the github repository of SGDK (to make sure I have the latest version, I was still using version 1.00). I successfully built the libmd.a file, but when compiling my project (which was compiling fine with 1.00), I get :

Code: Select all

echo "out/src/camera.o out/src/collisions.o out/src/input.o out/src/ints.o out/src/main.o out/src/object.o out/src/stagemap.o out/src/tsprite.o out/src/maps/level1_map_data.o out/src/maps/level1_palettes.o out/src/maps/level1_patterns_data.o out/src/chars/gurin.o out/src/chars/gurin_data.o out/src/chars/gurin_states.o out/src/chars/items.o out/src/chars/items_data.o out/src/chars/malon.o out/src/chars/malon_data.o out/src/chars/malon_states.o" > out/cmd_
c:/sgdk100/bin/gcc -Bc:/sgdk100/bin -n -T c:/sgdk100/md.ld -nostdlib out/sega.o @out/cmd_ c:/sgdk100/lib/libmd.a c:/sgdk100/lib/libgcc.a -o out/rom.out
c:/sgdk100/lib/libmd.a(sys.o): In function `_vint_callback':
sys.c:(.text+0x726): undefined reference to `currentZ80Driver'
make: *** [out/rom.out] Error 1
Is something missing ?

tryphon
Very interested
Posts: 303
Joined: Sat Aug 17, 2013 9:38 pm
Location: France

Re: undefined reference to `currentZ80Driver'

Post by tryphon » Wed Apr 06, 2016 3:25 pm

Everything is fine with SGDK 1.12 though.

Stef
Very interested
Posts: 2982
Joined: Thu Nov 30, 2006 9:46 pm
Location: France - Sevres
Contact:

Re: undefined reference to `currentZ80Driver'

Post by Stef » Wed Apr 06, 2016 6:20 pm

Hmm stupid typo i think, i probably messed up different versions. Try to just rename every "currentZ80Driver" occurence by "currentDriver" in sys.c file and try to compile again. It should fix the problem !

themrcul
Very interested
Posts: 81
Joined: Fri Apr 15, 2016 2:21 pm

Re: undefined reference to `currentZ80Driver'

Post by themrcul » Tue Apr 19, 2016 9:03 am

Hi Stef,
Firstly, as my first post on this forum, I want to thank you so much for your work on SGDK - this project has made it possible for me to even contemplate building games for the Mega Drive.

I have tried downloading the latest code from github but as tryphon has mentioned it complains about undefined reference to currentZ80Driver.
Unfortunately this reference is not in sys.c but is inside libmd.a and due to that I think it may need to be recompiled.
Otherwise every other part of the code seemed to compile fine.

Would it be possible to rebuild libmd.a and re-upload to github? Thanks again Stef!

-Alister

Stef
Very interested
Posts: 2982
Joined: Thu Nov 30, 2006 9:46 pm
Location: France - Sevres
Contact:

Re: undefined reference to `currentZ80Driver'

Post by Stef » Tue Apr 19, 2016 9:20 am

Thanks for your nice words about sgdk :D

You indeed need to recompile the library after having fixed the sys.c file. You can easily recompile the library by using the makelib.gen file (instead of the classic makefile.gen) :)

themrcul
Very interested
Posts: 81
Joined: Fri Apr 15, 2016 2:21 pm

Re: undefined reference to `currentZ80Driver'

Post by themrcul » Tue Apr 19, 2016 9:55 am

You are right, all fixed!

Thanks heaps for the quick reply :D

Post Reply