A high-level, general-purpose programming language, created as an extension of the C programming language, that has object-oriented, generic, and functional features in addition to facilities for low-level memory manipulation.
I get this error in my unit test code because i override "private" and "protected" keywords:
#if defined(UNIT_TEST)
#define protected public
#define private public
#endif
Of course, all my code compile, but the problem raized in link time, because std is precompiled using private and protected keywords, but linker searchs for public implementations:
public: static class std::locale::_Locimp * __cdecl std::locale::_Getgloballocale(void)" (?_Getgloballocale@locale@std@@SAPAV_Locimp@12@XZ)
Correct name found in stdlib:
private: static class std::locale::_Locimp * __cdecl std::locale::_Getgloballocale(void)" (?_Getgloballocale@locale@std@@SAPAV_Locimp@12@XZ)
The only difference is private -> public
SOLUTION: just remove #define's before include iostream and fstream
iostream
#if defined(UNIT_TEST)
# undef private
# undef protected
#endif
#include <iostream>
#include <fstream>
