I'm trying to build an opensource project that is basically dead and has zero maintainer support (WinCDEmu). I was able to follow the readme and get it pretty close to building with VS 2019 but I keep getting one failure that I don't understand:
11>BazisVirtualCDBus.obj : error LNK2001: unresolved external symbol "private: __thiscall BazisLib::DDK::BusDevice::PDOBase::PDOBase(wchar_t const *,wchar_t const *,wchar_t const *)" (??0PDOBase@BusDevice@DDK@BazisLib@@AAE@PB_W00@Z)
11>C:\wincdemu\WinCDEmu\AllModules\portable\BazisPortableCDBus32.sys : fatal error LNK1120: 1 unresolved externals
The constructor is actually defined in the bus.cpp
file and everything compiles fine in the Debug (Kernel-mode)
configuration. The error only appears when building in the Release (Kernel-mode)
configuration. Some more details about what I've done to fix other compilation issues on the way here are detailed in this issue: https://github.com/sysprogs/WinCDEmu/issues/38
I'd really appreciate any advice from someone with better understanding of Visual Studio about what's going on and how to build the project successfully as the maintainer has not responded for some time and doesn't seem to be interested in providing updated build instructions to others who have inquired.
EDIT
I understand very well "What is an undefined reference/unresolved external symbol error and how do I fix it?" This does not answer my question. The problem here is specifically that the project configuration is correct, the solution builds in the debug configuration but the symbol is undefined in the release configuration while there are no obvious differences between the two configurations that would cause the symbol to be undefined in one but not the other.
It's worth mentioning that bus.cpp
, where this symbol is actually defined, defines many other symbols which are not undefined in either build configuration. I'm trying to understand the reason why this specific symbol is problematic. While I was trying to find a solution, I also tried including the bus.cpp
file as a source in the BazisVirtualCDBus
project, which did resolve the issue above at the cost of producing numerous other errors about duplicate symbol definitions for everything else that is defined in the same file. The symbol in the error message above was not among the duplicates, which only adds to my confusion.