Anonymous | Login | 2024-11-21 15:37 UTC |
My View | View Issues | Change Log | Roadmap |
View Issue Details [ Jump to Notes ] | [ Issue History ] [ Print ] | ||||||||
ID | Project | Category | View Status | Date Submitted | Last Update | ||||
0000766 | VCMI | Other | public | 2011-07-05 18:05 | 2011-09-02 00:33 | ||||
Reporter | dimqua | ||||||||
Assigned To | ubuntux | ||||||||
Priority | normal | Severity | block | Reproducibility | always | ||||
Status | closed | Resolution | won't fix | ||||||
Platform | Debian | OS | GNU/Linux | OS Version | |||||
Product Version | |||||||||
Target Version | Fixed in Version | ||||||||
Summary | 0000766: Clang -- compilation fails | ||||||||
Description | Compilation fails with the following message: dimqua@localhost:~/vcmi$ make Making all in lib make[1]: Entering directory `/home/dimqua/vcmi/lib' CXX libvcmi_la-BattleAction.lo CXX libvcmi_la-BattleState.lo CXX libvcmi_la-CArtHandler.lo In file included from CArtHandler.cpp:2: In file included from ./../stdafx.h:21: ./../global.h:417:10: error: use of undeclared identifier 'find' return find(key)->second; ^ this-> CArtHandler.cpp:1298:24: note: in instantiation of member function 'bmap<unsigned short, ArtSlotInfo>::operator[]' requested here return &artifactsWorn[pos]; ^ In file included from CArtHandler.cpp:2: In file included from ./../stdafx.h:18: In file included from /usr/include/c++/4.5/map:60: /usr/include/c++/4.5/bits/stl_map.h:696:7: note: must qualify identifier to find this declaration in dependent base class find(const key_type& __x) ^ /usr/include/c++/4.5/bits/stl_map.h:711:7: note: must qualify identifier to find this declaration in dependent base class find(const key_type& __x) const ^ 1 error generated. make[1]: *** [libvcmi_la-CArtHandler.lo] Error 1 make[1]: Leaving directory `/home/dimqua/vcmi/lib' make: *** [all-recursive] Error 1 | ||||||||
Steps To Reproduce | $ svn co https://vcmi.svn.sourceforge.net/svnroot/vcmi/trunk [^] vcmi $ autoreconf -i $ CXX=clang ./configure --datadir=/YOUR_INSTALL_PATH/ --bindir=/YOUR_INSTALL_PATH/vcmi --libdir=/YOUR_INSTALL_PATH/ $ make | ||||||||
Additional Information | svn revision 2235 clang 2.9 | ||||||||
Tags | No tags attached. | ||||||||
Attached Files | bug766v1.patch [^] (449 bytes) 2011-07-26 21:47 [Show Content] | ||||||||
Notes | |
(0001884) exine (reporter) 2011-07-26 21:42 |
This error was particularly simple to fix, but new error appeared: Connection.cpp:409:15: error: no matching member function for call to 'registerVectoredType' CSerializer::registerVectoredType(&gs->map->artInstances, &CArtifactInstance::id); ~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~ In file included from Connection.cpp:3: ./Connection.h:262:7: note: candidate template ignored: failed template argument deduction void registerVectoredType(const std::vector<T*> *Vector, const si32 T::*IdPtr) ^ ./Connection.h:267:7: note: candidate template ignored: failed template argument deduction void registerVectoredType(const std::vector<ConstTransitivePtr<T> > *Vector, const si32 T::*IdPtr) ^ And by the way, why is registerVectoredType() implemented in header? |
(0001889) Tow dragon (viewer) 2011-07-27 19:41 |
@exine registerVectoredType() is a template of member function. You cannot implement them in .cpp file without nasty tricks. http://www.parashift.com/c++-faq-lite/templates.html#faq-35.12 [^] |
(0001891) Tow dragon (viewer) 2011-07-31 14:03 |
@exine I think that error could be fixed by adding second template parameter: template <typename T, typename U> void registerVectoredType(const std::vector<ConstTransitivePtr<T> > *Vector, const si32 U::*IdPtr) |
(0001892) exine (reporter) 2011-07-31 14:15 |
@Tow dragon I don't think so: Connection.cpp:405:2: error: no matching member function for call to 'registerVectoredType' registerVectoredType(&gs->map->objects, &CGObjectInstance::id); ^~~~~~~~~~~~~~~~~~~~ In file included from Connection.cpp:3: ./Connection.h:262:7: note: candidate template ignored: failed template argument deduction void registerVectoredType(const std::vector<T*> *Vector, const si32 U::*IdPtr) ^ ./Connection.h:267:7: note: candidate template ignored: failed template argument deduction void registerVectoredType(const std::vector<ConstTransitivePtr<T> > *Vector, const si32 U::*IdPtr) ^ Connection.cpp:406:2: error: no matching member function for call to 'registerVectoredType' registerVectoredType(&lib->heroh->heroes, &CHero::ID); ^~~~~~~~~~~~~~~~~~~~ In file included from Connection.cpp:3: ./Connection.h:262:7: note: candidate template ignored: failed template argument deduction void registerVectoredType(const std::vector<T*> *Vector, const si32 U::*IdPtr) ^ ./Connection.h:267:7: note: candidate template ignored: failed template argument deduction void registerVectoredType(const std::vector<ConstTransitivePtr<T> > *Vector, const si32 U::*IdPtr) ^ Connection.cpp:407:2: error: no matching member function for call to 'registerVectoredType' registerVectoredType(&lib->creh->creatures, &CCreature::idNumber); ^~~~~~~~~~~~~~~~~~~~ In file included from Connection.cpp:3: ./Connection.h:262:7: note: candidate template ignored: failed template argument deduction void registerVectoredType(const std::vector<T*> *Vector, const si32 U::*IdPtr) ^ ./Connection.h:267:7: note: candidate template ignored: failed template argument deduction void registerVectoredType(const std::vector<ConstTransitivePtr<T> > *Vector, const si32 U::*IdPtr) ^ Connection.cpp:408:2: error: no matching member function for call to 'registerVectoredType' registerVectoredType(&lib->arth->artifacts, &CArtifact::id); ^~~~~~~~~~~~~~~~~~~~ In file included from Connection.cpp:3: ./Connection.h:262:7: note: candidate template ignored: failed template argument deduction void registerVectoredType(const std::vector<T*> *Vector, const si32 U::*IdPtr) ^ ./Connection.h:267:7: note: candidate template ignored: failed template argument deduction void registerVectoredType(const std::vector<ConstTransitivePtr<T> > *Vector, const si32 U::*IdPtr) ^ Connection.cpp:409:2: error: no matching member function for call to 'registerVectoredType' registerVectoredType(&gs->map->artInstances, &CArtifactInstance::id); ^~~~~~~~~~~~~~~~~~~~ In file included from Connection.cpp:3: ./Connection.h:262:7: note: candidate template ignored: failed template argument deduction void registerVectoredType(const std::vector<T*> *Vector, const si32 U::*IdPtr) ^ ./Connection.h:267:7: note: candidate template ignored: failed template argument deduction void registerVectoredType(const std::vector<ConstTransitivePtr<T> > *Vector, const si32 U::*IdPtr) ^ 1 warning generated. |
(0001974) ubuntux (developer) 2011-09-02 00:33 |
Let's wait for clang to fix these issues. Not a real bug in vcmi, more like an annoyance. |
Issue History | |||
Date Modified | Username | Field | Change |
2011-07-05 18:05 | dimqua | New Issue | |
2011-07-26 21:42 | exine | Note Added: 0001884 | |
2011-07-26 21:47 | exine | File Added: bug766v1.patch | |
2011-07-27 19:41 | Tow dragon | Note Added: 0001889 | |
2011-07-31 14:03 | Tow dragon | Note Added: 0001891 | |
2011-07-31 14:15 | exine | Note Added: 0001892 | |
2011-09-02 00:33 | ubuntux | Note Added: 0001974 | |
2011-09-02 00:33 | ubuntux | Status | new => closed |
2011-09-02 00:33 | ubuntux | Assigned To | => ubuntux |
2011-09-02 00:33 | ubuntux | Resolution | open => won't fix |
Copyright © 2000 - 2024 MantisBT Team |