Answer the question
In order to leave comments, you need to log in
What is the LNK1120 linker error?
GitHub
code
given When trying to compile, it gives this
1>------ Build started: Project: SimpleLang, Configuration: Debug Win32 ------
1> Parser.cpp
1>MSVCRTD.lib(crtexe.obj) : error LNK2019: unresolved external symbol _main referenced in function ___tmainCRTStartup
1>C:\Users\Daniel\Documents\GitHub\SimpleLang\Debug\SimpleLang.exe : fatal error LNK1120: 1 unresolved externals
2>------ Build started: Project: Tests, Configuration: Debug Win32 ------
2> Parser_GetType.cpp
2>Parser_GetType.obj : error LNK2019: unresolved external symbol "public: static class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > __cdecl Parser::GetType(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >)" ([email protected]@@[email protected][email protected]@std@@[email protected]@[email protected]@std@@[email protected]@Z) referenced in function "private: virtual void __thiscall ParserTest_identifer_Test::TestBody(void)" ([email protected][email protected]@EAEXXZ)
2>C:\Users\Daniel\Documents\GitHub\SimpleLang\Debug\Tests.exe : fatal error LNK1120: 1 unresolved externals
========== Build: 0 succeeded, 2 failed, 1 up-to-date, 0 skipped ==========
Answer the question
In order to leave comments, you need to log in
It's written right there, one line higher:
1 -- definition of _main function
not found 2 -- definition of method std::string not found Parser::GetType(std::string)
I think that 1 should be a library linked to 2 .
Entry point not found apparently. Maybe incorrectly described, maybe not the right type of project.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question