0

I'm using Dlib 19.3 in Microsoft Visual Studio Community 2015. For compiling, I create Win32 Console Application, empty project. From Source Files, I add Existing Item file Source.cpp from dlib-19.3\dlib\all

Right-click on project properties, at Configuration choose All Configurations, then, on C/C++ -> General -> Additional Include Directories, I click on Edit and paste link to my dlib-19.3 folder, then I click OK.

I compile it and I get the following error

MSVCRTD.lib(exe_main.obj) : error LNK2019: unresolved external symbol _main referenced in function "int __cdecl invoke_main(void)" (?invoke_main@@YAHXZ)

How can I fix it?

Screen capture error LNK2019

  • having only Source.cpp is not enough. you should write your code that will use dlib. for example - try adding one more .cpp file from examples folder – Evgeniy Mar 01 '17 at 08:14
  • @Evgeniy Thanks, It work. But one more question, do I need to use Cmake for Dlib or I just add Dlib folder path to my project? – Võ Hoàng Trọng Mar 01 '17 at 08:19
  • both ways works. if you don't understand this - better to use Source.cpp included into your project – Evgeniy Mar 01 '17 at 08:23

0 Answers0