View Issue Details [ Jump to Notes ] | [ Issue History ] [ Print ] | ||||||||
ID | Project | Category | View Status | Date Submitted | Last Update | ||||
---|---|---|---|---|---|---|---|---|---|
0006055 | Spring engine | General | public | 2018-10-19 11:12 | 2018-10-19 19:09 | ||||
Reporter | lhog | ||||||||
Assigned To | Kloot | ||||||||
Priority | low | Severity | tweak | Reproducibility | always | ||||
Status | resolved | Resolution | fixed | ||||||
Product Version | 104.0 +git | ||||||||
Target Version | Fixed in Version | 104.0 +git | |||||||
Summary | 0006055: Can't build develop branch under VC++ 2017 | ||||||||
Description | I've fixed: 1) missing libvorbisenc-2.dll in vclibs\dll 2) missing #include <array> in ArchiveLoader.h but I struggle to fix the following: Error LNK2001 unresolved external symbol "public: static class std::vector<struct QTPFS::NodeLayer,class std::allocator<struct QTPFS::NodeLayer> > QTPFS::PathManager::nodeLayers" (?nodeLayers@PathManager@QTPFS@@2V?$vector@UNodeLayer@QTPFS@@V?$allocator@UNodeLayer@QTPFS@@@std@@@std@@A) engine-legacy G:\_programming\zero-k\spring\build-VC\rts\builds\legacy\QTPFSPathDrawer.obj 1 Error LNK2001 unresolved external symbol "public: static class std::vector<struct QTPFS::INode *,class std::allocator<struct QTPFS::INode *> > QTPFS::PathManager::nodeTrees" (?nodeTrees@PathManager@QTPFS@@2V?$vector@PAUINode@QTPFS@@V?$allocator@PAUINode@QTPFS@@@std@@@std@@A) engine-legacy G:\_programming\zero-k\spring\build-VC\rts\builds\legacy\QTPFSPathDrawer.obj 1 Error LNK2001 unresolved external symbol "public: static class std::vector<struct QTPFS::PathCache,class std::allocator<struct QTPFS::PathCache> > QTPFS::PathManager::pathCaches" (?pathCaches@PathManager@QTPFS@@2V?$vector@UPathCache@QTPFS@@V?$allocator@UPathCache@QTPFS@@@std@@@std@@A) engine-legacy G:\_programming\zero-k\spring\build-VC\rts\builds\legacy\QTPFSPathDrawer.obj 1 | ||||||||
Additional Information | Is this something that can be quickly fixed or disabled as QTPFS is not really widely adopted? | ||||||||
Tags | No tags attached. | ||||||||
Checked infolog.txt for Errors | |||||||||
Attached Files |
|
![]() |
|
Kloot (developer) 2018-10-19 13:20 |
apparently MSVC is behind the times, try this: diff --git a/rts/Sim/Path/QTPFS/PathManager.cpp b/rts/Sim/Path/QTPFS/PathManager.cpp index 1288165..694b4eb 100644 --- a/rts/Sim/Path/QTPFS/PathManager.cpp +++ b/rts/Sim/Path/QTPFS/PathManager.cpp @@ -104,15 +104,15 @@ namespace QTPFS { const size_t numCores = Threading::GetLogicalCpuCores(); return ((numThreads == 0)? numCores: numThreads); } +} - unsigned int PathManager::LAYERS_PER_UPDATE; - unsigned int PathManager::MAX_TEAM_SEARCHES; +unsigned int QTPFS::PathManager::LAYERS_PER_UPDATE; +unsigned int QTPFS::PathManager::MAX_TEAM_SEARCHES; - std::vector<NodeLayer> PathManager::nodeLayers; - std::vector<QTNode*> PathManager::nodeTrees; - std::vector<PathCache> PathManager::pathCaches; - std::vector< std::vector<IPathSearch*> > PathManager::pathSearches; -} +std::vector<QTPFS::NodeLayer> QTPFS::PathManager::nodeLayers; +std::vector<QTPFS::QTNode*> QTPFS::PathManager::nodeTrees; +std::vector<QTPFS::PathCache> QTPFS::PathManager::pathCaches; +std::vector< std::vector<QTPFS::IPathSearch*> > QTPFS::PathManager::pathSearches; |
lhog (reporter) 2018-10-19 16:16 |
Exactly same errors |
Kloot (developer) 2018-10-19 16:42 |
just work around it then: diff --git a/rts/Sim/Path/QTPFS/PathManager.cpp b/rts/Sim/Path/QTPFS/PathManager.cpp index 1288165..b15fb09 100644 --- a/rts/Sim/Path/QTPFS/PathManager.cpp +++ b/rts/Sim/Path/QTPFS/PathManager.cpp @@ -108,10 +108,10 @@ namespace QTPFS { unsigned int PathManager::LAYERS_PER_UPDATE; unsigned int PathManager::MAX_TEAM_SEARCHES; - std::vector<NodeLayer> PathManager::nodeLayers; - std::vector<QTNode*> PathManager::nodeTrees; - std::vector<PathCache> PathManager::pathCaches; - std::vector< std::vector<IPathSearch*> > PathManager::pathSearches; + // std::vector<NodeLayer> PathManager::nodeLayers; + // std::vector<QTNode*> PathManager::nodeTrees; + // std::vector<PathCache> PathManager::pathCaches; + // std::vector< std::vector<IPathSearch*> > PathManager::pathSearches; } diff --git a/rts/Sim/Path/QTPFS/PathManager.hpp b/rts/Sim/Path/QTPFS/PathManager.hpp index 5bca5a5..8bafb63 100644 --- a/rts/Sim/Path/QTPFS/PathManager.hpp +++ b/rts/Sim/Path/QTPFS/PathManager.hpp @@ -140,10 +140,10 @@ namespace QTPFS { std::string GetCacheDirName(const std::string& mapCheckSumHexStr, const std::string& modCheckSumHexStr) const; void Serialize(const std::string& cacheFileDir); - static std::vector<NodeLayer> nodeLayers; - static std::vector<QTNode*> nodeTrees; - static std::vector<PathCache> pathCaches; - static std::vector< std::vector<IPathSearch*> > pathSearches; + /*static*/ std::vector<NodeLayer> nodeLayers; + /*static*/ std::vector<QTNode*> nodeTrees; + /*static*/ std::vector<PathCache> pathCaches; + /*static*/ std::vector< std::vector<IPathSearch*> > pathSearches; |
lhog (reporter) 2018-10-19 16:44 |
Ok, sorted that one out. In PathManager.hpp moved: static std::vector<QTPFS::NodeLayer> nodeLayers; static std::vector<QTPFS::QTNode*> nodeTrees; static std::vector<QTPFS::PathCache> pathCaches; static std::vector< std::vector<QTPFS::IPathSearch*> > pathSearches; from private: to public: |
lhog (reporter) 2018-10-19 16:49 |
I can't claim even basic level of C++ knowledge, but it's a bit puzzling how other compilers allowed code, where private static variables of one class is accessed/assigned from other class. |
Kloot (developer) 2018-10-19 17:15 |
ah, now I see the errors originated in QTPFSPathDrawer which has a #define private public hack on top. this is just some unexpected difference in compiler/preprocessor behavior. |
lhog (reporter) 2018-10-19 17:20 |
Oh, this is nasty :) Reminds me immortal #define TRUE FALSE //Happy debugging suckers |
![]() |
|||
Date Modified | Username | Field | Change |
---|---|---|---|
2018-10-19 11:12 | lhog | New Issue | |
2018-10-19 13:20 | Kloot | Note Added: 0019413 | |
2018-10-19 16:16 | lhog | Note Added: 0019414 | |
2018-10-19 16:42 | Kloot | Note Added: 0019415 | |
2018-10-19 16:44 | lhog | Note Added: 0019416 | |
2018-10-19 16:49 | lhog | Note Added: 0019417 | |
2018-10-19 17:15 | Kloot | Note Added: 0019418 | |
2018-10-19 17:20 | lhog | Note Added: 0019419 | |
2018-10-19 19:09 | Kloot | Assigned To | => Kloot |
2018-10-19 19:09 | Kloot | Status | new => resolved |
2018-10-19 19:09 | Kloot | Resolution | open => fixed |
2018-10-19 19:09 | Kloot | Fixed in Version | => 104.0 +git |