The NEW Build Your Own Arcade Controls

Main => Software Forum => Topic started by: Minwah on October 13, 2009, 06:07:11 am

Title: Compiling v0.134
Post by: Minwah on October 13, 2009, 06:07:11 am
Anyone done this? I get a load of 'undefined reference' errors at the end...
Title: Re: Compiling v0.134
Post by: Kman-Sweden on October 13, 2009, 06:13:45 am
Compiled 0.134 version of MameUIFX witout any problems. How are you compiling? programs?
Title: Re: Compiling v0.134
Post by: Minwah on October 13, 2009, 06:21:01 am
Mame Compiler v1.17...

Probably my fault, but I've only altered mamedriv.c.
Title: Re: Compiling v0.134
Post by: Minwah on October 13, 2009, 06:37:48 am
I lied...I had applied the hiscore patch too. Still not sure what would cause theese errors:

Compiling Mame...
Compiling src/emu/video.c...
Archiving obj/windows/mame/libemu.a...
Linking mame.exe...
obj/windows/mame/mame/jpm.a(jpmimpct.o):jpmimpct.c:(.text+0xae): undefined reference to `stepper_optic_state'
obj/windows/mame/mame/jpm.a(jpmimpct.o):jpmimpct.c:(.text+0xc9): undefined reference to `stepper_optic_state'
obj/windows/mame/mame/jpm.a(jpmimpct.o):jpmimpct.c:(.text+0xe4): undefined reference to `stepper_optic_state'
obj/windows/mame/mame/jpm.a(jpmimpct.o):jpmimpct.c:(.text+0xff): undefined reference to `stepper_optic_state'
Finished!
0 Hours 0 Minutes and 16 Seconds Elapsed.
obj/windows/mame/mame/jpm.a(jpmimpct.o):jpmimpct.c:(.text+0x11a): undefined reference to `stepper_optic_state'
obj/windows/mame/mame/jpm.a(jpmimpct.o):jpmimpct.c:(.text+0x135): more undefined references to `stepper_optic_state' follow
obj/windows/mame/mame/jpm.a(jpmimpct.o):jpmimpct.c:(.text+0xa15): undefined reference to `starpoint_interface_48step'
obj/windows/mame/mame/jpm.a(jpmimpct.o):jpmimpct.c:(.text+0xa22): undefined reference to `stepper_config'
obj/windows/mame/mame/jpm.a(jpmimpct.o):jpmimpct.c:(.text+0xa2d): undefined reference to `starpoint_interface_48step'
obj/windows/mame/mame/jpm.a(jpmimpct.o):jpmimpct.c:(.text+0xa3a): undefined reference to `stepper_config'
obj/windows/mame/mame/jpm.a(jpmimpct.o):jpmimpct.c:(.text+0xa45): undefined reference to `starpoint_interface_48step'
obj/windows/mame/mame/jpm.a(jpmimpct.o):jpmimpct.c:(.text+0xa52): undefined reference to `stepper_config'
obj/windows/mame/mame/jpm.a(jpmimpct.o):jpmimpct.c:(.text+0xa5d): undefined reference to `starpoint_interface_48step'
obj/windows/mame/mame/jpm.a(jpmimpct.o):jpmimpct.c:(.text+0xa6a): undefined reference to `stepper_config'
obj/windows/mame/mame/jpm.a(jpmimpct.o):jpmimpct.c:(.text+0xa75): undefined reference to `starpoint_interface_48step'
obj/windows/mame/mame/jpm.a(jpmimpct.o):jpmimpct.c:(.text+0xa82): undefined reference to `stepper_config'
obj/windows/mame/mame/jpm.a(jpmimpct.o):jpmimpct.c:(.text+0xa8d): undefined reference to `starpoint_interface_48step'
obj/windows/mame/mame/jpm.a(jpmimpct.o):jpmimpct.c:(.text+0xa9a): undefined reference to `stepper_config'
obj/windows/mame/mame/jpm.a(jpmimpct.o):jpmimpct.c:(.text+0xaa5): undefined reference to `starpoint_interface_48step'
obj/windows/mame/mame/jpm.a(jpmimpct.o):jpmimpct.c:(.text+0xab2): undefined reference to `stepper_config'
obj/windows/mame/mame/jpm.a(jpmimpct.o):jpmimpct.c:(.text+0xbcb): undefined reference to `Mechmtr_update'
obj/windows/mame/mame/jpm.a(jpmimpct.o):jpmimpct.c:(.text+0xc99): undefined reference to `stepper_update'
obj/windows/mame/mame/jpm.a(jpmimpct.o):jpmimpct.c:(.text+0xcb3): undefined reference to `stepper_update'
obj/windows/mame/mame/jpm.a(jpmimpct.o):jpmimpct.c:(.text+0xccd): undefined reference to `stepper_update'
obj/windows/mame/mame/jpm.a(jpmimpct.o):jpmimpct.c:(.text+0xd03): undefined reference to `stepper_update'
obj/windows/mame/mame/jpm.a(jpmimpct.o):jpmimpct.c:(.text+0xdc4): undefined reference to `Mechmtr_update'
obj/windows/mame/mame/jpm.a(jpmimpct.o):jpmimpct.c:(.text+0xce3): undefined reference to `stepper_update'
obj/windows/mame/mame/jpm.a(jpmimpct.o):jpmimpct.c:(.text+0xd19): undefined reference to `stepper_update'
obj/windows/mame/mame/jpm.a(jpmimpct.o):jpmimpct.c:(.rdata+0x2b44): undefined reference to `layout_awpvid16'
obj/windows/mame/mame/midway.a(seattle.o):seattle.c:(.text+0x599): undefined reference to `cage_control_w'
obj/windows/mame/mame/midway.a(seattle.o):seattle.c:(.text+0x5a9): undefined reference to `cage_control_w'
obj/windows/mame/mame/midway.a(seattle.o):seattle.c:(.text+0x1a96): undefined reference to `cage_init'
obj/windows/mame/mame/midway.a(seattle.o):seattle.c:(.text+0x1bb6): undefined reference to `cage_init'
obj/windows/mame/mame/midway.a(seattle.o):seattle.c:(.rdata+0x10ec): undefined reference to `machine_config_cage_seattle'
obj/windows/mame/mame/midway.a(midwayic.o):midwayic.c:(.text+0x159c): undefined reference to `cage_control_r'
obj/windows/mame/mame/midway.a(midwayic.o):midwayic.c:(.text+0x1663): undefined reference to `main_from_cage_r'
obj/windows/mame/mame/midway.a(midwayic.o):midwayic.c:(.text+0x22d1): undefined reference to `cage_control_w'
obj/windows/mame/mame/midway.a(midwayic.o):midwayic.c:(.text+0x22e9): undefined reference to `cage_control_w'
obj/windows/mame/mame/midway.a(midwayic.o):midwayic.c:(.text+0x23ac): undefined reference to `main_to_cage_w'
obj/windows/mame/mame/midway.a(midwayic.o):midwayic.c:(.text+0x2de5): undefined reference to `cage_set_irq_handler'
collect2: ld returned 1 exit status
mingw32-make: *** [mame.exe] Error 1
Title: Re: Compiling v0.134
Post by: Minwah on October 13, 2009, 06:40:49 am
I particularly don't understand this one:

obj/windows/mame/mame/midway.a(seattle.o):seattle.c:(.rdata+0x10ec): undefined reference to `machine_config_cage_seattle'

I can't find this string anywhere in the code  ???
Title: Re: Compiling v0.134
Post by: Minwah on October 13, 2009, 08:07:06 am
I started again, and got it to compile :)

But now mame.exe will not run, I get 'Access Violation'.

I think I've had this before, but I can't remember how to get around it...anyone give me a clue?
Title: Re: Compiling v0.134
Post by: MKChamp on October 13, 2009, 10:06:33 am
I started again, and got it to compile :)

But now mame.exe will not run, I get 'Access Violation'.

I think I've had this before, but I can't remember how to get around it...anyone give me a clue?

What did you modify in the mamedriv.c? If all you did was patch and modify, the access violation has to be due to one of the two :)
I can try to do what you did and see if I get the same errors...
Title: Re: Compiling v0.134
Post by: Kman-Sweden on October 13, 2009, 11:22:17 am
Did you use the 0.134 HI patch?
Title: Re: Compiling v0.134
Post by: u_rebelscum on October 13, 2009, 01:13:21 pm
I particularly don't understand this one:

obj/windows/mame/mame/midway.a(seattle.o):seattle.c:(.rdata+0x10ec): undefined reference to `machine_config_cage_seattle'

I can't find this string anywhere in the code  ???

I know it's late, and probably TMI, but it's mame's use of MACROs (#define). 

In src/emu/mconfig.h, lines 183-184 (0.134u3), there's:
#define MACHINE_DRIVER_NAME(_name) \
   machine_config_##_name


So somewhere in the source there's a line that effectively says "MACHINE_DRIVER_NAME( cage_seattle )".  During pre-compiling, the compiler would replace this line with "machine_config_cage_seattle", the string you were looking for. 

I say "effectively" because it's MACRO'ed to say that!  Again in src/emu/mconfig.h, just below the prior line (lines 186-187), there's:
#define MACHINE_DRIVER_START(_name) \
   const machine_config_token MACHINE_DRIVER_NAME(_name)[] = {


And in src/mame/audio/cage.c, line 682, there's MACHINE_DRIVER_START( cage_seattle ).


So the pre-compiler takes:

MACHINE_DRIVER_START( cage_seattle )

changes to:

const machine_config_token MACHINE_DRIVER_NAME( cage_seattle )[] = {

And changes that to:

const machine_config_token machine_config_cage_seattle[] = {

Which is the begenning of setting up an array variable called machine_config_cage_seattle.


BTW, I had no problems compiling 0.134 or 0.134u3 from command line (no edits though).  Did you try a clean compiile?
Title: Re: Compiling v0.134
Post by: Minwah on October 15, 2009, 04:43:18 am
I had another go last night...it seems a compile of the stock Mame v0.134 works fine.

When I use the hiscore (0.134) patch, it compiles ok but I get an 'Access Violation' when running it. I am not sure how to go about figuring this one out?

As for the 'Undefined reference' errors on compiling...these appear when I alter mamedriv.c and remove a load of games. I think I must have removed some required bios drivers or something... (edit: actually no, not sure what the problem is).