|
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
|
|
|
|
Re: Compilation error DeviceClass invalid target type for dynamic_cast
[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!
|
|
|
|