(original) (raw)

In my code here https://github.com/DragonOsman/currency\_converter , I used C++17 and managed to get it to work (though I'm only using std::map::insert\_or\_assign() from C++17). And I'm using Windows, so I shouldn't use LDFLAGS or CXXFLAGS as environment variables. I'll use them directly on the compiler command line instead. The libraries I need to link against are C:/boost\_1\_68\_0/stage/lib/libboost\_system-vc141-mt-x64-1\_68.lib and C:/Jinja2Cpp/install\_x64/lib/static/jinja2cpp.lib.

I tried to build it with this flag:
"
clang++ -std=c++17 -Wall -pedantic -D\_SILENCE\_CXX17\_ADAPTOR\_TYPEDEFS\_DEPRECATION\_WARNING -Dvariant\_CONFIG\_SELECT\_VARIANT=variant\_VARIANT\_NONSTD -D\_SILENCE\_CXX17\_ALLOCATOR\_VOID\_DEPRECATION\_WARNING -D\_CRT\_SECURE\_NO\_WARNINGS -D\_WINSOCK\_DEPRECATED\_NO\_WARNINGS -D\_WIN32 \-D\_WIN32\_WINDOWS -D\_NDEBUG -fexceptions -IC:/Jinja2Cpp/install\_x64/include -IC:/json/single\_include -IC:/boost\_1\_68\_0 -LC:/boost\_1\_68\_0/stage/lib/libboost\_system-vc141-mt-x64-1\_68.lib -LC:/Jinja2Cpp/install\_x64/lib/static/jinja2cpp.lib currency\_converter.cpp \-o currency\_converter.exe
"
And I got these warnings and errors from LLD:

"
lld-link: warning: C:\\Users\\Osman\\AppData\\Local\\Temp\\currency\_converter-264ae1.o: locally defined symbol imported: \_\_std\_terminate (defined in libvcruntime.lib(ehhelpers.obj)) \[LNK4217\]
lld-link: error: undefined symbol: "public: \_\_cdecl jinja2::Template::Template(class jinja2::TemplateEnv \*)" (??0Template@jinja2@@QEAA@PEAVTemplateEnv@1@@Z)​
>>> referenced by C:\\Users\\Osman\\AppData\\Local\\Temp\\currency\_converter-264ae1.o:("void \_\_cdecl handle\_request, class std::allocator>, class std::allocator, struct server\_session::send\_lambda &>(class boost::basic\_string\_view>, struct boost::beast::http::message<1, struct boost::beast::http::basic\_string\_body, class std::allocator>, class boost::beast::http::basic\_fields>> &&, struct server\_session::send\_lambda &, char const \*, char const \*)" (??$handle\_request@U?$basic\_string\_body@DU?$char\_traits@D@std@@V?$allocator@D@2@@http@beast@boost@@V?$allocator@D@std@@AEAUsend\_lambda@server\_session@@@@YAXV?$basic\_string\_view@DU?$char\_traits@D@std@@@boost@@$$QEAU?$message@$00U?$basic\_string\_body@DU?$char\_traits@D@std@@V?$allocator@D@2@@http@beast@boost@@V?$basic\_fields@V?$allocator@D@std@@@234@@http@beast@1@AEAUsend\_lambda@server\_session@@PEBD3@Z))​
lld-link: error: undefined symbol: "public: class nonstd::expected\_lite::expected> \_\_cdecl jinja2::Template::LoadFromFile(class std::basic\_string, class std::allocator> const &)" (?LoadFromFile@Template@jinja2@@QEAA?AV?$expected@XV?$ErrorInfoTpl@D@jinja2@@@expected\_lite@nonstd@@AEBV?$basic\_string@DU?$char\_traits@D@std@@V?$allocator@D@2@@std@@@Z)​
>>> referenced by C:\\Users\\Osman\\AppData\\Local\\Temp\\currency\_converter-264ae1.o:("void \_\_cdecl handle\_request, class std::allocator>, class std::allocator, struct server\_session::send\_lambda &>(class boost::basic\_string\_view>, struct boost::beast::http::message<1, struct boost::beast::http::basic\_string\_body, class std::allocator>, class boost::beast::http::basic\_fields>> &&, struct server\_session::send\_lambda &, char const \*, char const \*)" (??$handle\_request@U?$basic\_string\_body@DU?$char\_traits@D@std@@V?$allocator@D@2@@http@beast@boost@@V?$allocator@D@std@@AEAUsend\_lambda@server\_session@@@@YAXV?$basic\_string\_view@DU?$char\_traits@D@std@@@boost@@$$QEAU?$message@$00U?$basic\_string\_body@DU?$char\_traits@D@std@@V?$allocator@D@2@@http@beast@boost@@V?$basic\_fields@V?$allocator@D@std@@@234@@http@beast@1@AEAUsend\_lambda@server\_session@@PEBD3@Z))​
lld-link: error: undefined symbol: "public: class std::basic\_string, class std::allocator> \_\_cdecl jinja2::Template::RenderAsString(class std::unordered\_map, class std::allocator>, class jinja2::Value, struct std::hash, class std::allocator>>, struct std::equal\_to, class std::allocator>>, class std::allocator, class std::allocator> const, class jinja2::Value>>> const &)" (?RenderAsString@Template@jinja2@@QEAA?AV?$basic\_string@DU?$char\_traits@D@std@@V?$allocator@D@2@@std@@AEBV?$unordered\_map@V?$basic\_string@DU?$char\_traits@D@std@@V?$allocator@D@2@@std@@VValue@jinja2@@U?$hash@V?$basic\_string@DU?$char\_traits@D@std@@V?$allocator@D@2@@std@@@2@U?$equal\_to@V?$basic\_string@DU?$char\_traits@D@std@@V?$allocator@D@2@@std@@@2@V?$allocator@U?$pair@$$CBV?$basic\_string@DU?$char\_traits@D@std@@V?$allocator@D@2@@std@@VValue@jinja2@@@std@@@2@@4@@Z)​
>>> referenced by C:\\Users\\Osman\\AppData\\Local\\Temp\\currency\_converter-264ae1.o:("void \_\_cdecl handle\_request, class std::allocator>, class std::allocator, struct server\_session::send\_lambda &>(class boost::basic\_string\_view>, struct boost::beast::http::message<1, struct boost::beast::http::basic\_string\_body, class std::allocator>, class boost::beast::http::basic\_fields>> &&, struct server\_session::send\_lambda &, char const \*, char const \*)" (??$handle\_request@U?$basic\_string\_body@DU?$char\_traits@D@std@@V?$allocator@D@2@@http@beast@boost@@V?$allocator@D@std@@AEAUsend\_lambda@server\_session@@@@YAXV?$basic\_string\_view@DU?$char\_traits@D@std@@@boost@@$$QEAU?$message@$00U?$basic\_string\_body@DU?$char\_traits@D@std@@V?$allocator@D@2@@http@beast@boost@@V?$basic\_fields@V?$allocator@D@std@@@234@@http@beast@1@AEAUsend\_lambda@server\_session@@PEBD3@Z))​
>>> referenced by C:\\Users\\Osman\\AppData\\Local\\Temp\\currency\_converter-264ae1.o:("void \_\_cdecl handle\_request, class std::allocator>, class std::allocator, struct server\_session::send\_lambda &>(class boost::basic\_string\_view>, struct boost::beast::http::message<1, struct boost::beast::http::basic\_string\_body, class std::allocator>, class boost::beast::http::basic\_fields>> &&, struct server\_session::send\_lambda &, char const \*, char const \*)" (??$handle\_request@U?$basic\_string\_body@DU?$char\_traits@D@std@@V?$allocator@D@2@@http@beast@boost@@V?$allocator@D@std@@AEAUsend\_lambda@server\_session@@@@YAXV?$basic\_string\_view@DU?$char\_traits@D@std@@@boost@@$$QEAU?$message@$00U?$basic\_string\_body@DU?$char\_traits@D@std@@V?$allocator@D@2@@http@beast@boost@@V?$basic\_fields@V?$allocator@D@std@@@234@@http@beast@1@AEAUsend\_lambda@server\_session@@PEBD3@Z))​
lld-link: error: undefined symbol: "public: \_\_cdecl jinja2::Template::\~Template(void)" (??1Template@jinja2@@QEAA@XZ)​
>>> referenced by C:\\Users\\Osman\\AppData\\Local\\Temp\\currency\_converter-264ae1.o:("void \_\_cdecl handle\_request, class std::allocator>, class std::allocator, struct server\_session::send\_lambda &>(class boost::basic\_string\_view>, struct boost::beast::http::message<1, struct boost::beast::http::basic\_string\_body, class std::allocator>, class boost::beast::http::basic\_fields>> &&, struct server\_session::send\_lambda &, char const \*, char const \*)" (??$handle\_request@U?$basic\_string\_body@DU?$char\_traits@D@std@@V?$allocator@D@2@@http@beast@boost@@V?$allocator@D@std@@AEAUsend\_lambda@server\_session@@@@YAXV?$basic\_string\_view@DU?$char\_traits@D@std@@@boost@@$$QEAU?$message@$00U?$basic\_string\_body@DU?$char\_traits@D@std@@V?$allocator@D@2@@http@beast@boost@@V?$basic\_fields@V?$allocator@D@std@@@234@@http@beast@1@AEAUsend\_lambda@server\_session@@PEBD3@Z))​
>>> referenced by C:\\Users\\Osman\\AppData\\Local\\Temp\\currency\_converter-264ae1.o:("int \`void \_\_cdecl handle\_request, class std::allocator>, class std::allocator, struct server\_session::send\_lambda &>(class boost::basic\_string\_view>, struct basic\_string\_view>::beast::http::message<1, struct boost::beast::http::basic\_string\_body, class std::allocator>, class boost::beast::http::basic\_fields>> &&, struct server\_session::send\_lambda &, char const \*, char const \*)'::\`1'::dtor$114" (?dtor$114@?0???$handle\_request@U?$basic\_string\_body@DU?$char\_traits@D@std@@V?$allocator@D@2@@http@beast@boost@@V?$allocator@D@std@@AEAUsend\_lambda@server\_session@@@@YAXV?$basic\_string\_view@DU?$char\_traits@D@std@@@boost@@$$QEAU?$message@$00U?$basic\_string\_body@DU?$char\_traits@D@std@@V?$allocator@D@2@@http@beast@boost@@V?$basic\_fields@V?$allocator@D@std@@@234@@http@beast@1@AEAUsend\_lambda@server\_session@@PEBD3@Z@4HA))​
lld-link: warning: C:\\Users\\Osman\\AppData\\Local\\Temp\\currency\_converter-264ae1.o: locally defined symbol imported: \_CxxThrowException (defined in libvcruntime.lib(throw.obj)) \[LNK4217\]​
lld-link: error: undefined symbol: "class boost::system::error\_category const & \_\_cdecl boost::system::detail::system\_category\_ncx(void)" (?system\_category\_ncx@detail@system@boost@@YAAEBVerror\_category@23@XZ)​
>>> referenced by C:\\Users\\Osman\\AppData\\Local\\Temp\\currency\_converter-264ae1.o:("class boost::system::error\_category const & \_\_cdecl boost::system::system\_category(void)" (?system\_category@system@boost@@YAAEBVerror\_category@12@XZ))​
lld-link: warning: C:\\Users\\Osman\\AppData\\Local\\Temp\\currency\_converter-264ae1.o: locally defined symbol imported: \_\_RTDynamicCast (defined in libvcruntime.lib(rtti.obj)) \[LNK4217\]​
lld-link: error: undefined symbol: "class boost::system::error\_category const & \_\_cdecl boost::system::detail::generic\_category\_ncx(void)" (?generic\_category\_ncx@detail@system@boost@@YAAEBVerror\_category@23@XZ)​
>>> referenced by C:\\Users\\Osman\\AppData\\Local\\Temp\\currency\_converter-264ae1.o:("class boost::system::error\_category const & \_\_cdecl boost::system::generic\_category(void)" (?generic\_category@system@boost@@YAAEBVerror\_category@12@XZ))​
clang++: error: linker command failed with exit code 1 (use -v to see invocation)
"
Google Maps + Currency Converter Web Application. Application for Computer Science course. This is a currency converter web application with the frontend and a backend.
github.com