MAMEWorld >> Programming
Previous thread Previous  View all threads Index   Next thread Next   Threaded Mode Threaded  

Pages: 1

rubinstu
MAME Fan
Reged: 02/05/10
Posts: 20
Send PM


Compilation error DeviceClass invalid target type for dynamic_cast
#389955 - 02/20/21 04:19 PM


Hi, I am trying to build the MAME from source using MS Visual Studio 2019 (16.6.0). I am getting a weird compilation error in two places in devfind.h:
13>D:\Users\Stuart\Documents\mame-ai\src\emu\devfind.h(647,1): error C2680: 'DeviceClass *': invalid target type for dynamic_cast
13>D:\Users\Stuart\Documents\mame-ai\src\emu\devfind.h(647,1): error C2680: with
13>D:\Users\Stuart\Documents\mame-ai\src\emu\devfind.h(647,1): error C2680: [
13>D:\Users\Stuart\Documents\mame-ai\src\emu\devfind.h(647,1): error C2680: DeviceClass=dragon_midi_device
13>D:\Users\Stuart\Documents\mame-ai\src\emu\devfind.h(647,1): error C2680: ]
13>D:\Users\Stuart\Documents\mame-ai\src\emu\devfind.h(647,1): error C2680: this->m_target = dynamic_cast(device);
13>D:\Users\Stuart\Documents\mame-ai\src\emu\devfind.h(647,1): error C2680: ^
13>D:\Users\Stuart\Documents\mame-ai\src\emu\devfind.h(647,1): message : 'dragon_midi_device': class must be defined before using in a dynamic_cast
13>D:\Users\Stuart\Documents\mame-ai\src\emu\devfind.h(647,1): message : this->m_target = dynamic_cast(device);
13>D:\Users\Stuart\Documents\mame-ai\src\emu\devfind.h(647,1): message : ^
13>D:\Users\Stuart\Documents\mame-ai\src\emu\devfind.h(638): message : while compiling class template member function 'bool device_finder::findit(validity_checker *)'
13>D:\Users\Stuart\Documents\mame-ai\src\emu\devfind.h(638): message : {

Has anyone run into this? "dynamic_cast" is a new feature to me, so I don't really know how to work around it. Thank you!

Stuart



rubinstu
MAME Fan
Reged: 02/05/10
Posts: 20
Send PM


Re: Compilation error DeviceClass invalid target type for dynamic_cast new [Re: rubinstu]
#394490 - 07/24/22 06:56 PM


So, I jumped back into this project with a fresh insatlation of MS Visual Studio, latest source code, etc., and still have the same error. I would really appreciate if someone could give me some guidance here! Thank you!


Pages: 1

MAMEWorld >> Programming
Previous thread Previous  View all threads Index   Next thread Next   Threaded Mode Threaded  

Extra information Permissions
Moderator:  Pi 
0 registered and 5 anonymous users are browsing this forum.
You cannot start new topics
You cannot reply to topics
HTML is enabled
UBBCode is enabled
Thread views: 455