用户工具

站点工具


paste

**这是本文档旧的修订版!**

LMVM的報錯 在iOS上使用cmake編譯時產生的 以下是報錯內容: /private/var/mobile/Documents/LMVM/vm/main.cpp:21:20: error: no matching constructor for initialization of 'VirtualMachine' VirtualMachine vm(code,argv); ^ ~~~~~~~~~ /private/var/mobile/Documents/LMVM/vm/vm.h:29:5: note: candidate constructor not viable: no known conversion from 'std::vector<Op>' to 'const char *' for 1st argument VirtualMachine(const char argc, char* argv[]); ^ /private/var/mobile/Documents/LMVM/vm/vm.h:28:5: note: candidate constructor not viable: requires single argument 'program', but 2 arguments were provided VirtualMachine(std::vector<Op>& program); ^ /private/var/mobile/Documents/LMVM/vm/vm.h:11:7: note: candidate constructor (the implicit copy constructor) not viable: requires 1 argument, but 2 were provided class VirtualMachine { ^ /private/var/mobile/Documents/LMVM/vm/main.cpp:30:31: error: invalid operands to binary expression ('basicostream<char, chartraits<char»' and 'const typename enableif<isduration<duration<long long, ratio<1, 1000»>::value, duration<long long, ratio<1, 1000»>::type' (aka 'const std::chrono::duration<long long, std::ratio<1, 1000»')) std::cout « “Finish in ” « durms « std::endl; ~~~~~~~~~~~~~~~~~~~~~~~~~ ^ ~~~~~~ /var/jb/usr/bin/../include/c++/v1/cstddef:125:3: note: candidate function template not viable: no known conversion from 'basicostream<char, chartraits<char»' to 'byte' for 1st argument operator« (byte lhs, Integer shift) noexcept ^ /var/jb/usr/bin/../include/c++/v1/ostream:791:1: note: candidate function template not viable: no known conversion from 'const typename enableif<isduration<duration<long long, ratio<1, 1000»>::value, duration<long long, ratio<1, 1000»>::type' (aka 'const std::chrono::duration<long long, std::ratio<1, 1000»') to 'char' for 2nd argument operator«(basicostream<CharT, Traits>& os, char cn) ^ /var/jb/usr/bin/../include/c++/v1/ostream:824:1: note: candidate function template not viable: no known conversion from 'const typename enableif<isduration<duration<long long, ratio<1, 1000»>::value, duration<long long, ratio<1, 1000»>::type' (aka 'const std::chrono::duration<long long, std::ratio<1, 1000»') to 'char' for 2nd argument operator«(basicostream<char, _Traits>& os, char c) ^ /var/jb/usr/bin/../include/c++/v1/ostream:831:1: note: candidate function template not viable: no known conversion from 'const typename enableif<isduration<duration<long long, ratio<1, 1000»>::value, duration<long long, ratio<1, 1000»>::type' (aka 'const std::chrono::duration<long long, std::ratio<1, 1000»') to 'signed char' for 2nd argument operator«(basicostream<char, _Traits>& os, signed char c) ^ /var/jb/usr/bin/../include/c++/v1/ostream:838:1: note: candidate function template not viable: no known conversion from 'const typename enableif<isduration<duration<long long, ratio<1, 1000»>::value, duration<long long, ratio<1, 1000»>::type' (aka 'const std::chrono::duration<long long, std::ratio<1, 1000»') to 'unsigned char' for 2nd argument operator«(basicostream<char, Traits>& os, unsigned char c) ^ /var/jb/usr/bin/../include/c++/v1/ostream:852:1: note: candidate function template not viable: no known conversion from 'const typename enableif<isduration<duration<long long, ratio<1, 1000»>::value, duration<long long, ratio<1, 1000»>::type' (aka 'const std::chrono::duration<long long, std::ratio<1, 1000»') to 'const char ' for 2nd argument operator«(basicostream<CharT, Traits>& os, const char* strn) ^ /var/jb/usr/bin/../include/c++/v1/ostream:898:1: note: candidate function template not viable: no known conversion from 'const typename enableif<isduration<duration<long long, ratio<1, 1000»>::value, duration<long long, ratio<1, 1000»>::type' (aka 'const std::chrono::duration<long long, std::ratio<1, 1000»') to 'const char ' for 2nd argument operator«(basicostream<char, _Traits>& os, const char* str) ^ /var/jb/usr/bin/../include/c++/v1/ostream:905:1: note: candidate function template not viable: no known conversion from 'const typename enableif<isduration<duration<long long, ratio<1, 1000»>::value, duration<long long, ratio<1, 1000»>::type' (aka 'const std::chrono::duration<long long, std::ratio<1, 1000»') to 'const signed char ' for 2nd argument operator«(basicostream<char, _Traits>& os, const signed char* str) ^ /var/jb/usr/bin/../include/c++/v1/ostream:913:1: note: candidate function template not viable: no known conversion from 'const typename enableif<isduration<duration<long long, ratio<1, 1000»>::value, duration<long long, ratio<1, 1000»>::type' (aka 'const std::chrono::duration<long long, std::ratio<1, 1000»') to 'const unsigned char ' for 2nd argument operator«(basicostream<char, _Traits>& os, const unsigned char* str) ^ /var/jb/usr/bin/../include/c++/v1/ostream:1098:1: note: candidate function template not viable: no known conversion from 'const typename enableif<isduration<duration<long long, ratio<1, 1000»>::value, duration<long long, ratio<1, 1000»>::type' (aka 'const std::chrono::duration<long long, std::ratio<1, 1000»') to 'const errorcode' for 2nd argument operator«(basicostream<CharT, Traits>& os, const errorcode& ec) ^ /var/jb/usr/bin/../include/c++/v1/ostream:1136:31: note: candidate function template not viable: no known conversion from 'const typename enableif<isduration<duration<long long, ratio<1, 1000»>::value, duration<long long, ratio<1, 1000»>::type' (aka 'const std::chrono::duration<long long, std::ratio<1, 1000»') to 'wchart' for 2nd argument basicostream<char, Traits>& operator«(basicostream<char, Traits>&, wchart) = delete; ^ /var/jb/usr/bin/../include/c++/v1/ostream:1139:31: note: candidate function template not viable: no known conversion from 'const typename enableif<isduration<duration<long long, ratio<1, 1000»>::value, duration<long long, ratio<1, 1000»>::type' (aka 'const std::chrono::duration<long long, std::ratio<1, 1000»') to 'const wchart ' for 2nd argument basicostream<char, _Traits>& operator«(basicostream<char, Traits>&, const wchart) = delete; ^ /var/jb/usr/bin/../include/c++/v1/ostream:1157:31: note: candidate function template not viable: no known conversion from 'const typename enableif<isduration<duration<long long, ratio<1, 1000»>::value, duration<long long, ratio<1, 1000»>::type' (aka 'const std::chrono::duration<long long, std::ratio<1, 1000»') to 'char8t' for 2nd argument basicostream<char, Traits>& operator«(basicostream<char, Traits>&, char8t) = delete; ^ /var/jb/usr/bin/../include/c++/v1/ostream:1163:31: note: candidate function template not viable: no known conversion from 'const typename enableif<isduration<duration<long long, ratio<1, 1000»>::value, duration<long long, ratio<1, 1000»>::type' (aka 'const std::chrono::duration<long long, std::ratio<1, 1000»') to 'const char8t ' for 2nd argument basicostream<char, _Traits>& operator«(basicostream<char, Traits>&, const char8t) = delete; ^ /var/jb/usr/bin/../include/c++/v1/ostream:1170:31: note: candidate function template not viable: no known conversion from 'const typename enableif<isduration<duration<long long, ratio<1, 1000»>::value, duration<long long, ratio<1, 1000»>::type' (aka 'const std::chrono::duration<long long, std::ratio<1, 1000»') to 'char16t' for 2nd argument basicostream<char, Traits>& operator«(basicostream<char, Traits>&, char16t) = delete; ^ /var/jb/usr/bin/../include/c++/v1/ostream:1173:31: note: candidate function template not viable: no known conversion from 'const typename enableif<isduration<duration<long long, ratio<1, 1000»>::value, duration<long long, ratio<1, 1000»>::type' (aka 'const std::chrono::duration<long long, std::ratio<1, 1000»') to 'char32t' for 2nd argument basicostream<char, Traits>& operator«(basicostream<char, Traits>&, char32t) = delete; ^ /var/jb/usr/bin/../include/c++/v1/ostream:1176:31: note: candidate function template not viable: no known conversion from 'const typename enableif<isduration<duration<long long, ratio<1, 1000»>::value, duration<long long, ratio<1, 1000»>::type' (aka 'const std::chrono::duration<long long, std::ratio<1, 1000»') to 'const char16t ' for 2nd argument basicostream<char, _Traits>& operator«(basicostream<char, Traits>&, const char16t) = delete; ^ /var/jb/usr/bin/../include/c++/v1/ostream:1179:31: note: candidate function template not viable: no known conversion from 'const typename enableif<isduration<duration<long long, ratio<1, 1000»>::value, duration<long long, ratio<1, 1000»>::type' (aka 'const std::chrono::duration<long long, std::ratio<1, 1000»') to 'const char32t *' for 2nd argument basicostream<char, _Traits>& operator«(basicostream<char, Traits>&, const char32t) = delete; ^ /var/jb/usr/bin/../include/c++/v1/ostream:784:1: note: candidate template ignored: deduced conflicting types for parameter 'CharT' ('char' vs. 'typename enableif<isduration<duration<long long, ratio<1, 1000»>::value, duration<long long, ratio<1, 1000»>::type' (aka 'std::chrono::duration<long long, std::ratio<1, 1000»')) operator«(basicostream<CharT, Traits>& os, CharT c) ^ /var/jb/usr/bin/../include/c++/v1/random/uniformintdistribution.h:259:1: note: candidate template ignored: could not match 'uniformintdistribution' against 'duration' operator«(basicostream<CharT, _Traits>& os, ^ /var/jb/usr/bin/../include/c++/v1/ostream:845:1: note: candidate template ignored: could not match 'const CharT ' against 'typename enableif<isduration<duration<long long, ratio<1, 1000»>::value, duration<long long, ratio<1, 1000»>::type' (aka 'std::chrono::duration<long long, std::ratio<1, 1000»') operator«(basicostream<CharT, Traits>& os, const CharT* str) ^ /var/jb/usr/bin/../include/c++/v1/ostream:1081:1: note: candidate template ignored: could not match 'basicstring' against 'duration' operator«(basicostream<CharT, _Traits>& os, ^ /var/jb/usr/bin/../include/c++/v1/ostream:1089:1: note: candidate template ignored: could not match 'basicstringview' against 'duration' operator«(basicostream<CharT, Traits>& os, ^ /var/jb/usr/bin/../include/c++/v1/ostream:1106:1: note: candidate template ignored: could not match 'sharedptr' against 'duration' operator«(basicostream<CharT, _Traits>& os, sharedptr<Yp> const& p) ^ /var/jb/usr/bin/../include/c++/v1/ostream:1125:1: note: candidate template ignored: could not match 'bitset' against 'duration' operator«(basicostream<CharT, _Traits>& os, const bitset<Size>& x) ^ /var/jb/usr/bin/../include/c++/v1/ostream:1073:11: note: candidate template ignored: requirement 'integralconstant<bool, false>::value' was not satisfied [with _Stream = std::ostream &, _Tp = std::chrono::duration<long long, std::ratio<1, 1000»] Stream&& operator«(Stream&& os, const Tp& x) ^ /var/jb/usr/bin/../include/c++/v1/ostream:1118:1: note: candidate template ignored: could not match 'uniqueptr' against 'duration' operator«(basicostream<CharT, _Traits>& os, uniqueptr<Yp, Dp> const& p) ^ /var/jb/usr/bin/../include/c++/v1/ostream:1142:34: note: candidate template ignored: could not match 'wchart' against 'char' basicostream<wchart, _Traits>& operator«(basicostream<wchart, _Traits>&, char16t) = delete; ^ /var/jb/usr/bin/../include/c++/v1/ostream:1145:34: note: candidate template ignored: could not match 'wchart' against 'char' basicostream<wchart, _Traits>& operator«(basicostream<wchart, _Traits>&, char32t) = delete; ^ /var/jb/usr/bin/../include/c++/v1/ostream:1148:34: note: candidate template ignored: could not match 'wchart' against 'char' basicostream<wchart, _Traits>& operator«(basicostream<wchart, _Traits>&, const char16t) = delete; ^ /var/jb/usr/bin/../include/c++/v1/ostream:1151:34: note: candidate template ignored: could not match 'wchart' against 'char' basicostream<wchart, _Traits>& operator«(basicostream<wchart, _Traits>&, const char32t) = delete; ^ /var/jb/usr/bin/../include/c++/v1/ostream:1160:34: note: candidate template ignored: could not match 'wchart' against 'char' basicostream<wchart, _Traits>& operator«(basicostream<wchart, _Traits>&, char8t) = delete; ^ /var/jb/usr/bin/../include/c++/v1/ostream:1166:34: note: candidate template ignored: could not match 'wchart' against 'char' basicostream<wchart, _Traits>& operator«(basicostream<wchart, _Traits>&, const char8t) = delete; ^ /var/jb/usr/bin/../include/c++/v1/iomanip:362:1: note: candidate template ignored: could not match 'iomt8' against 'duration' operator«(basicostream<CharT, _Traits>& os, const iomt8<MoneyT>& x) ^ /var/jb/usr/bin/../include/c++/v1/iomanip:482:1: note: candidate template ignored: could not match 'iomt10' against 'duration' operator«(basicostream<CharT, Traits>& os, const iomt10<CharT>& x) ^ /var/jb/usr/bin/../include/c++/v1/ostream:220:20: note: candidate function not viable: no known conversion from 'const typename enableif<isduration<duration<long long, ratio<1, 1000»>::value, duration<long long, ratio<1, 1000»>::type' (aka 'const std::chrono::duration<long long, std::ratio<1, 1000»') to 'ostream &()(ostream &)' for 1st argument basicostream& operator«(basicostream& (pf)(basicostream&)) ^ /var/jb/usr/bin/../include/c++/v1/ostream:224:20: note: candidate function not viable: no known conversion from 'const typename enableif<isduration<duration<long long, ratio<1, 1000»>::value, duration<long long, ratio<1, 1000»>::type' (aka 'const std::chrono::duration<long long, std::ratio<1, 1000»') to 'basicios<chartype, traitstype> &()(basicios<chartype, traitstype> &)' (aka 'basicios<char, std::chartraits<char» &()(basicios<char, std::chartraits<char» &)') for 1st argument basicostream& operator«(basicios<chartype, traitstype>& ^ /var/jb/usr/bin/../include/c++/v1/ostream:229:20: note: candidate function not viable: no known conversion from 'const typename enableif<isduration<duration<long long, ratio<1, 1000»>::value, duration<long long, ratio<1, 1000»>::type' (aka 'const std::chrono::duration<long long, std::ratio<1, 1000»') to 'iosbase &()(iosbase &)' for 1st argument basicostream& operator«(iosbase& (pf)(iosbase&)) ^ /var/jb/usr/bin/../include/c++/v1/ostream:232:20: note: candidate function not viable: no known conversion from 'const typename enableif<isduration<duration<long long, ratio<1, 1000»>::value, duration<long long, ratio<1, 1000»>::type' (aka 'const std::chrono::duration<long long, std::ratio<1, 1000»') to 'bool' for 1st argument basicostream& operator«(bool n); ^ /var/jb/usr/bin/../include/c++/v1/ostream:233:20: note: candidate function not viable: no known conversion from 'const typename enableif<isduration<duration<long long, ratio<1, 1000»>::value, duration<long long, ratio<1, 1000»>::type' (aka 'const std::chrono::duration<long long, std::ratio<1, 1000»') to 'short' for 1st argument basicostream& operator«(short n); ^ /var/jb/usr/bin/../include/c++/v1/ostream:234:20: note: candidate function not viable: no known conversion from 'const typename enableif<isduration<duration<long long, ratio<1, 1000»>::value, duration<long long, ratio<1, 1000»>::type' (aka 'const std::chrono::duration<long long, std::ratio<1, 1000»') to 'unsigned short' for 1st argument basicostream& operator«(unsigned short n); ^ /var/jb/usr/bin/../include/c++/v1/ostream:235:20: note: candidate function not viable: no known conversion from 'const typename enableif<isduration<duration<long long, ratio<1, 1000»>::value, duration<long long, ratio<1, 1000»>::type' (aka 'const std::chrono::duration<long long, std::ratio<1, 1000»') to 'int' for 1st argument basicostream& operator«(int n); ^ /var/jb/usr/bin/../include/c++/v1/ostream:236:20: note: candidate function not viable: no known conversion from 'const typename enableif<isduration<duration<long long, ratio<1, 1000»>::value, duration<long long, ratio<1, 1000»>::type' (aka 'const std::chrono::duration<long long, std::ratio<1, 1000»') to 'unsigned int' for 1st argument basicostream& operator«(unsigned int n); ^ /var/jb/usr/bin/../include/c++/v1/ostream:237:20: note: candidate function not viable: no known conversion from 'const typename enableif<isduration<duration<long long, ratio<1, 1000»>::value, duration<long long, ratio<1, 1000»>::type' (aka 'const std::chrono::duration<long long, std::ratio<1, 1000»') to 'long' for 1st argument basicostream& operator«(long n); ^ /var/jb/usr/bin/../include/c++/v1/ostream:238:20: note: candidate function not viable: no known conversion from 'const typename enableif<isduration<duration<long long, ratio<1, 1000»>::value, duration<long long, ratio<1, 1000»>::type' (aka 'const std::chrono::duration<long long, std::ratio<1, 1000»') to 'unsigned long' for 1st argument basicostream& operator«(unsigned long n); ^ /var/jb/usr/bin/../include/c++/v1/ostream:239:20: note: candidate function not viable: no known conversion from 'const typename enableif<isduration<duration<long long, ratio<1, 1000»>::value, duration<long long, ratio<1, 1000»>::type' (aka 'const std::chrono::duration<long long, std::ratio<1, 1000»') to 'long long' for 1st argument basicostream& operator«(long long n); ^ /var/jb/usr/bin/../include/c++/v1/ostream:240:20: note: candidate function not viable: no known conversion from 'const typename enableif<isduration<duration<long long, ratio<1, 1000»>::value, duration<long long, ratio<1, 1000»>::type' (aka 'const std::chrono::duration<long long, std::ratio<1, 1000»') to 'unsigned long long' for 1st argument basicostream& operator«(unsigned long long n); ^ /var/jb/usr/bin/../include/c++/v1/ostream:241:20: note: candidate function not viable: no known conversion from 'const typename enableif<isduration<duration<long long, ratio<1, 1000»>::value, duration<long long, ratio<1, 1000»>::type' (aka 'const std::chrono::duration<long long, std::ratio<1, 1000»') to 'float' for 1st argument basicostream& operator«(float f); ^ /var/jb/usr/bin/../include/c++/v1/ostream:242:20: note: candidate function not viable: no known conversion from 'const typename enableif<isduration<duration<long long, ratio<1, 1000»>::value, duration<long long, ratio<1, 1000»>::type' (aka 'const std::chrono::duration<long long, std::ratio<1, 1000»') to 'double' for 1st argument basicostream& operator«(double f); ^ /var/jb/usr/bin/../include/c++/v1/ostream:243:20: note: candidate function not viable: no known conversion from 'const typename enableif<isduration<duration<long long, ratio<1, 1000»>::value, duration<long long, ratio<1, 1000»>::type' (aka 'const std::chrono::duration<long long, std::ratio<1, 1000»') to 'long double' for 1st argument basicostream& operator«(long double f); ^ /var/jb/usr/bin/../include/c++/v1/ostream:244:20: note: candidate function not viable: no known conversion from 'const typename enableif<isduration<duration<long long, ratio<1, 1000»>::value, duration<long long, ratio<1, 1000»>::type' (aka 'const std::chrono::duration<long long, std::ratio<1, 1000»') to 'const void ' for 1st argument; take the address of the argument with & basicostream& operator«(const void* p); ^ /var/jb/usr/bin/../include/c++/v1/ostream:253:20: note: candidate function not viable: no known conversion from 'const typename enableif<isduration<duration<long long, ratio<1, 1000»>::value, duration<long long, ratio<1, 1000»>::type' (aka 'const std::chrono::duration<long long, std::ratio<1, 1000»') to 'basicstreambuf<chartype, traitstype> ' (aka 'basicstreambuf<char, std::chartraits<char» *') for 1st argument basicostream& operator«(basicstreambuf<chartype, traitstype> sb); ^ /var/jb/usr/bin/../include/c++/v1/ostream:259:20: note: candidate function not viable: no known conversion from 'const typename enableif<isduration<duration<long long, ratio<1, 1000»>::value, duration<long long, ratio<1, 1000»>::type' (aka 'const std::chrono::duration<long long, std::ratio<1, 1000»') to 'nullptrt' (aka 'std::nullptrt') for 1st argument basicostream& operator«(nullptrt) ^ 2 errors generated. make[2]: * [CMakeFiles/lmvm.dir/build.make:76: CMakeFiles/lmvm.dir/vm/main.cpp.o] Error 1 make[1]: * [CMakeFiles/Makefile2:85: CMakeFiles/lmvm.dir/all] Error 2 make: * [Makefile:91: all] Error 2

paste.1762589344.txt.gz · 最后更改: ad

除额外注明的地方外,本维基上的内容按下列许可协议发布: CC0 1.0 Universal
CC0 1.0 Universal Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki