1

I am new to programming. I want to install Glog on my Windows 10 system. I have followed the instructions found in a Stack Overflow thread with the same name.

I used cmake and Visual Studio 2015 to build the project. First anomaly of the built file: I noticed that in the glog directory the header file "log_severity.h" was missing. To alleviate this problem, I copied the "log_severity.h" from the GitHub repository and pasted it.

https://i.stack.imgur.com/xOxhn.jpg

I then created a sample program that just initializes the logger by only using

google::InitGoogleLogging(argv[0]); in the main.

Before compiling I direct the linker to include an additional include directory. This include directory is the one with the header files as in the second image (with the log_severity.h etc.):

https://i.stack.imgur.com/7yIzy.jpg

Yet I still receive a linking error when compiling the code:

1>Source.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) void __cdecl google::InitGoogleLogging(char const *)" (__imp_?InitGoogleLogging@google@@YAXPEBD@Z) referenced in function main 1>D:\Documents\Programming\C++\Programme\GLogTest\GlogTest\x64\Debug\GlogTest.exe : fatal error LNK1120: 1 unresolved externals

What am I doing wrong?

Thanks a lot of any answers.

Theodor Johnson
  • 247
  • 1
  • 8

1 Answers1

0

I solved it. When you build the project in visual studio, there is also an "Installation" folder inside the MS project. I forgot to build that as well!

Theodor Johnson
  • 247
  • 1
  • 8