0

I use visual studio 2019. Therewas a lesson I passed with some C++ code. But when I try to compile it it show some LNK2019 and LNK2001 eror : external symbol not resolved. When I select only the .cpp and .h files (one by one) to be compiled, no error is shown. So I wonder this is linked to the .exe compilation. So maybe the .lib is not added, whereas I didn't find on internet how to add it. I use as include:

#include <cmath>
#include <ctime>
#include <random>

I don't know how to solve this problem. I can show the code, but I merely think it is a LINK error.

Dharman
  • 30,962
  • 25
  • 85
  • 135
  • Including things and linking things are two separate steps. Just because you included a library header does not automatically mean the implementation will be linked. You probably have to change some settings in your compilation options (which you didn't show) – UnholySheep May 04 '22 at 09:54
  • You also failed to provide a [mre] and the exact error messages that it causes – UnholySheep May 04 '22 at 09:54

0 Answers0