Previous Thread
Next Thread
Print Thread
Trying to do a single driver build with coleco #115948 09/18/19 04:19 PM
Joined: Feb 2014
Posts: 328
G
Golden Child Offline OP
Senior Member
OP Offline
Senior Member
G
Joined: Feb 2014
Posts: 328
Hi guys, I was trying to do a single driver build with coleco or the adam with:

make SOURCES=src/mame/drivers/coleco.cpp SUBTARGET=mycoleco

make SOURCES=src/mame/drivers/adam.cpp SUBTARGET=myadam

everything compiles fine but I get linking errors:

seems that there's some undefined references to

colecovision_cartridge_slot_device::bd_r
colecovision_cartridge_slot_device::colecovision_cartridge_slot_device
vtable for colecovision_cartridge_slot_device

Code

Creating ../../../../linux_gcc/bin/x64/Release/mame_mycoleco
Archiving libdasm.a...
Archiving libformats.a...
Archiving libmame_mycoleco.a...
Archiving liboptional.a...
Archiving libosd_sdl.a...
Archiving libocore_sdl.a...
Building driver list...
1 source file(s) found
6 driver(s) found
Compiling generated/mame/mycoleco/drivlist.cpp...
Linking mycoleco64...
/usr/bin/ld: ../../../../linux_gcc/bin/x64/Release/mame_mycoleco/libmame_mycoleco.a(coleco.o): in function `coleco_state::cart_r(address_space&, unsigned int, unsigned char)':
coleco.cpp:(.text+0x400): undefined reference to `colecovision_cartridge_slot_device::bd_r(unsigned int, unsigned char, int, int, int, int)'
/usr/bin/ld: ../../../../linux_gcc/bin/x64/Release/mame_mycoleco/libmame_mycoleco.a(coleco.o): in function `coleco_state::coleco(machine_config&)':
coleco.cpp:(.text+0x2335): undefined reference to `colecovision_cartridge_slot_device::colecovision_cartridge_slot_device(machine_config const&, char const*, device_t*, unsigned int)'
/usr/bin/ld: coleco.cpp:(.text+0x2426): undefined reference to `colecovision_cartridges(device_slot_interface&)'
/usr/bin/ld: ../../../../linux_gcc/bin/x64/Release/mame_mycoleco/libmame_mycoleco.a(coleco.o): in function `coleco_state::coleco(machine_config&) [clone .cold.210]':
coleco.cpp:(.text.unlikely+0xaf7): undefined reference to `vtable for colecovision_cartridge_slot_device'
/usr/bin/ld: ../../../../linux_gcc/bin/x64/Release/mame_mycoleco/libmame_mycoleco.a(coleco.o): in function `std::unique_ptr<device_t, std::default_delete<device_t> > emu::detail::device_type_impl_base::create_driver<coleco_state>(emu::detail::device_type_impl_base const&, machine_config const&, char const*, device_t*, unsigned int)':
coleco.cpp:(.text._ZN3emu6detail21device_type_impl_base13create_driverI12coleco_stateEESt10unique_ptrI8device_tSt14default_deleteIS5_EERKS1_RK14machine_configPKcPS5_j[_ZN3emu6detail21device_type_impl_base13create_driverI12coleco_stateEESt10unique_ptrI8device_tSt14default_deleteIS5_EERKS1_RK14machine_configPKcPS5_j]+0xcb): undefined reference to `vtable for device_finder<colecovision_cartridge_slot_device, true>'
collect2: error: ld returned 1 exit status
make[2]: *** [mycoleco.make:251: ../../../../../mycoleco64] Error 1
make[1]: *** [Makefile:100: mycoleco] Error 2
make: *** [makefile:1291: linux_x64] Error 2


Re: Trying to do a single driver build with coleco [Re: Golden Child] #115949 09/18/19 04:26 PM
Joined: Aug 2015
Posts: 379
Edstrom Offline
Senior Member
Offline
Senior Member
Joined: Aug 2015
Posts: 379
Try add REGENIE=1 at the end of the command

Re: Trying to do a single driver build with coleco [Re: Edstrom] #115950 09/18/19 04:29 PM
Joined: Feb 2014
Posts: 328
G
Golden Child Offline OP
Senior Member
OP Offline
Senior Member
G
Joined: Feb 2014
Posts: 328
adding REGENIE=1 gives the same errors..

Re: Trying to do a single driver build with coleco [Re: Golden Child] #115953 09/19/19 12:57 AM
Joined: Apr 2006
Posts: 710
Tafoid Offline
Senior Member
Offline
Senior Member
Joined: Apr 2006
Posts: 710
In my testing you cannot make a single driver build with those drivers due to unaccounted for/unique dependencies.
I'd suggest adding the 3 .cpp files in "src/bus/devices/coleco/cartridge" and see if that helps it along.
You can add them to the MAKE line using a comma ( , ) to separate the locations.



Last edited by Tafoid; 09/19/19 02:31 AM. Reason: changed controllers to cartridge



Re: Trying to do a single driver build with coleco [Re: Golden Child] #115954 09/19/19 02:25 AM
Joined: Feb 2004
Posts: 2,067
Vas Crabb Offline
Very Senior Member
Offline
Very Senior Member
Joined: Feb 2004
Posts: 2,067
It should be able to pick it up automatically though - see the markup in scripts/src/bus.lua:
Code
---------------------------------------------------
--
--@src/devices/bus/coleco/controller/ctrl.h,BUSES["COLECO_CONTROLLER"] = true
---------------------------------------------------

if (BUSES["COLECO_CONTROLLER"]~=null) then
        files {
                MAME_DIR .. "src/devices/bus/coleco/controller/ctrl.cpp",
                MAME_DIR .. "src/devices/bus/coleco/controller/ctrl.h",
                MAME_DIR .. "src/devices/bus/coleco/controller/hand.cpp",
                MAME_DIR .. "src/devices/bus/coleco/controller/hand.h",
                MAME_DIR .. "src/devices/bus/coleco/controller/sac.cpp",
                MAME_DIR .. "src/devices/bus/coleco/controller/sac.h",
        }
end


Including the header for the bus should make it add all the sources there automatically. Can someone work out why it's not working for this particular bus?

Re: Trying to do a single driver build with coleco [Re: Golden Child] #115955 09/19/19 02:29 AM
Joined: Feb 2004
Posts: 2,067
Vas Crabb Offline
Very Senior Member
Offline
Very Senior Member
Joined: Feb 2004
Posts: 2,067
Actually, after reading the error, it's not the controller, it's the cartridge, and the error is obvious.

Re: Trying to do a single driver build with coleco [Re: Vas Crabb] #115957 09/19/19 07:31 AM
Joined: Feb 2014
Posts: 328
G
Golden Child Offline OP
Senior Member
OP Offline
Senior Member
G
Joined: Feb 2014
Posts: 328
The path in bus.lua for the --@src/devices/bus/coleco/cartridge/exp.h was missing the "cartridge" part of the subdirectory, but after adding it, the error remains.

Code
---------------------------------------------------
--
--@src/devices/bus/coleco/cartridge/exp.h,BUSES["COLECO_CART"] = true
---------------------------------------------------

if (BUSES["COLECO_CART"]~=null) then
        files {
                MAME_DIR .. "src/devices/bus/coleco/cartridge/exp.cpp",
                MAME_DIR .. "src/devices/bus/coleco/cartridge/exp.h",
                MAME_DIR .. "src/devices/bus/coleco/cartridge/std.cpp",
                MAME_DIR .. "src/devices/bus/coleco/cartridge/std.h",
                MAME_DIR .. "src/devices/bus/coleco/cartridge/xin1.h",
                MAME_DIR .. "src/devices/bus/coleco/cartridge/xin1.cpp",
        }
end



Who's Online Now
2 registered members (xinyingho, AJR), 26 guests, and 10 spiders.
Key: Admin, Global Mod, Mod
ShoutChat Box
Comment Guidelines: Do post respectful and insightful comments. Don't flame, hate, spam.
Forum Statistics
Forums9
Topics8,692
Posts114,252
Members4,865
Most Online510
Aug 26th, 2019
Powered by UBB.threads™ PHP Forum Software 7.7.3