0

I am a beginner in C++. I am compiling my school project which uses log4cxx. Luckily i found a already built version for visual c++ 2008 in this site.

After downloading the files, I did the following

Tools->Options->VC++Directories->Library Files, add path to Release_Shared directory for linking necessary libraries

Tools->Options->VC++Directories->Include Files, add path to src/main/include

But even after this I am getting errors like, 'logError' identifier not found "ERROR" undeclared identifier. Clearly something is missing.

I have seen somewhere I am supposed to do something with the .dll files, but not sure what it is. Can somebody help me with this, or point me to a place where there are step-by-step instructions for setting up this sort of configuration? Many thanks.

Jav_Rock
  • 22,059
  • 20
  • 123
  • 164

1 Answers1

2

The note in your link:

To use the static link log4cxx library, the macro LOG4CXX_STATIC MUST be defined in your projects preprocessor, otherwise your compilation will suffer unresolved linking error.

Preprocessor Definitions in VS 2008

or use

#define LOG4CXX_STATIC

before header include

Markus
  • 21
  • 1