calref / cboe

Classic Blades of Exile
http://spiderwebforums.ipbhost.com/index.php?/forum/12-blades-of-exile/
Other
167 stars 41 forks source link

Fix visual studio build #326

Closed NQNStudios closed 1 year ago

NQNStudios commented 1 year ago
NQNStudios commented 1 year ago

Now the CI is throwing linker errors that I don't encounter in my local Visual Studio build. Fun!

Common.lib(creature.obj) : error LNK2001: unresolved external symbol "private: void __cdecl cTagFile_TagList::internal_add_tag(void)" (?internal_add_tag@cTagFile_TagList@@AEAAXXZ) [D:\a\cboe\cboe\proj\vs2017\Blades of Exile.vcxproj]
Common.lib(creature.obj) : error LNK2001: unresolved external symbol "public: class cTagFile_TagList & __cdecl cTagFile_Page::operator[](class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &)" (??AcTagFile_Page@@QEAAAEAVcTagFile_TagList@@AEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z) [D:\a\cboe\cboe\proj\vs2017\Blades of Exile.vcxproj]
Common.lib(creature.obj) : error LNK2001: unresolved external symbol "public: class cTagFile_TagList const & __cdecl cTagFile_Page::operator[](class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &)const " (??AcTagFile_Page@@QEBAAEBVcTagFile_TagList@@AEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z) [D:\a\cboe\cboe\proj\vs2017\Blades of Exile.vcxproj]
Common.lib(creature.obj) : error LNK2001: unresolved external symbol "public: unsigned __int64 __cdecl cTagFile_Tag::encode(unsigned __int64,bool const &)" (?encode@cTagFile_Tag@@QEAA_K_KAEB_N@Z) [D:\a\cboe\cboe\proj\vs2017\Blades of Exile.vcxproj]
Common.lib(creature.obj) : error LNK2001: unresolved external symbol "public: unsigned __int64 __cdecl cTagFile_Tag::extract(unsigned __int64,bool &)const " (?extract@cTagFile_Tag@@QEBA_K_KAEA_N@Z) [D:\a\cboe\cboe\proj\vs2017\Blades of Exile.vcxproj]
Common.lib(item.obj) : error LNK2001: unresolved external symbol "public: bool __cdecl cTagFile_Page::contains(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &)const " (?contains@cTagFile_Page@@QEBA_NAEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z) [D:\a\cboe\cboe\proj\vs2017\Blades of Exile.vcxproj]
Common.lib(item.obj) : error LNK2001: unresolved external symbol "public: class cTagFile_Tag & __cdecl cTagFile_Page::add(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &)" (?add@cTagFile_Page@@QEAAAEAVcTagFile_Tag@@AEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z) [D:\a\cboe\cboe\proj\vs2017\Blades of Exile.vcxproj]
Common.lib(item.obj) : error LNK2001: unresolved external symbol "public: unsigned __int64 __cdecl cTagFile_Tag::encode(unsigned __int64,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &)" (?encode@cTagFile_Tag@@QEAA_K_KAEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z) [D:\a\cboe\cboe\proj\vs2017\Blades of Exile.vcxproj]
Common.lib(item.obj) : error LNK2001: unresolved external symbol "public: unsigned __int64 __cdecl cTagFile_Tag::extract(unsigned __int64,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > &)const " (?extract@cTagFile_Tag@@QEBA_K_KAEAV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z) [D:\a\cboe\cboe\proj\vs2017\Blades of Exile.vcxproj]
Common.lib(pc.obj) : error LNK2001: unresolved external symbol "public: unsigned __int64 __cdecl cTagFile_TagList::size(void)const " (?size@cTagFile_TagList@@QEBA_KXZ) [D:\a\cboe\cboe\proj\vs2017\Blades of Exile.vcxproj]
Common.lib(pc.obj) : error LNK2001: unresolved external symbol "public: unsigned __int64 __cdecl cTagFile_Page::index(void)const " (?index@cTagFile_Page@@QEBA_KXZ) [D:\a\cboe\cboe\proj\vs2017\Blades of Exile.vcxproj]
Common.lib(pc.obj) : error LNK2001: unresolved external symbol "public: class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > __cdecl cTagFile_Page::getFirstKey(void)const " (?getFirstKey@cTagFile_Page@@QEBA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@XZ) [D:\a\cboe\cboe\proj\vs2017\Blades of Exile.vcxproj]
Common.lib(pc.obj) : error LNK2001: unresolved external symbol "public: class cTagFile_Page & __cdecl cTagFile::add(void)" (?add@cTagFile@@QEAAAEAVcTagFile_Page@@XZ) [D:\a\cboe\cboe\proj\vs2017\Blades of Exile.vcxproj]
Common.lib(party.obj) : error LNK2001: unresolved external symbol "public: unsigned __int64 __cdecl cTagFile_Tag::encode(unsigned __int64,unsigned char const &)" (?encode@cTagFile_Tag@@QEAA_K_KAEBE@Z) [D:\a\cboe\cboe\proj\vs2017\Blades of Exile.vcxproj]
Common.lib(party.obj) : error LNK2001: unresolved external symbol "public: unsigned __int64 __cdecl cTagFile_Tag::extract(unsigned __int64,unsigned char &)const " (?extract@cTagFile_Tag@@QEBA_K_KAEAE@Z) [D:\a\cboe\cboe\proj\vs2017\Blades of Exile.vcxproj]
Common.lib(scenario.obj) : error LNK2001: unresolved external symbol "public: class cTagFile_Page const & __cdecl cTagFile::operator[](unsigned __int64)const " (??AcTagFile@@QEBAAEBVcTagFile_Page@@_K@Z) [D:\a\cboe\cboe\proj\vs2017\Blades of Exile.vcxproj]
Common.lib(fileio_party.obj) : error LNK2001: unresolved external symbol "public: class cTagFile_Page & __cdecl cTagFile::operator[](unsigned __int64)" (??AcTagFile@@QEAAAEAVcTagFile_Page@@_K@Z) [D:\a\cboe\cboe\proj\vs2017\Blades of Exile.vcxproj]
Common.lib(fileio_party.obj) : error LNK2001: unresolved external symbol "public: void __cdecl cTagFile::clear(void)" (?clear@cTagFile@@QEAAXXZ) [D:\a\cboe\cboe\proj\vs2017\Blades of Exile.vcxproj]
Common.lib(fileio_party.obj) : error LNK2001: unresolved external symbol "public: void __cdecl cTagFile::writeTo(class std::basic_ostream<char,struct std::char_traits<char> > &)const " (?writeTo@cTagFile@@QEBAXAEAV?$basic_ostream@DU?$char_traits@D@std@@@std@@@Z) [D:\a\cboe\cboe\proj\vs2017\Blades of Exile.vcxproj]
Common.lib(fileio_party.obj) : error LNK2001: unresolved external symbol "public: void __cdecl cTagFile::readFrom(class std::basic_istream<char,struct std::char_traits<char> > &)" (?readFrom@cTagFile@@QEAAXAEAV?$basic_istream@DU?$char_traits@D@std@@@std@@@Z) [D:\a\cboe\cboe\proj\vs2017\Blades of Exile.vcxproj]
D:\a\cboe\cboe\proj\vs2017\x64\Release\Blades of Exile.exe : fatal error LNK1120: 20 unresolved externals [D:\a\cboe\cboe\proj\vs2017\Blades of Exile.vcxproj]
NQNStudios commented 1 year ago

Maybe more of the overloads need to be specified as I did in https://github.com/calref/cboe/pull/326/commits/f80d6308f6e9f217a1cadacf5bfd97256b324b76 but that's weird because the cases I changed were reproducible compiler errors, not linker errors.

CelticMinstrel commented 1 year ago

The linker error kind of looks like a file that should be in the project is not in the project, but when I check if that file is in the project, it appears to be there…

NQNStudios commented 1 year ago

From the win64 CI log...

"C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\Bin\MSBuild.exe" -clp:ForceConsoleColor -target:Build -property:Configuration=Release -property:Platform=x64 "proj/vs2017/Blades of Exile.sln"  
 exit /b !errorlevel! 

I'm using VS 2017 for my local build. Could the problem be that CI is using 2019?

EDIT: The last successful win-vs64 CI run also used 2019, so maybe not, but I can try installing 2019 to reproduce the error.

NQNStudios commented 1 year ago

Building with the 2019 build tools did in fact reproduce the linker errors.

NQNStudios commented 1 year ago

Interesting line in the CI log: https://github.com/calref/cboe/actions/runs/4028262954/jobs/6924949093#step:4:638

x64\Release\tagfile.obj : warning LNK4042: object specified more than once; extras ignored [D:\a\cboe\cboe\proj\vs2017\Common\Common.vcxproj]