-
Notifications
You must be signed in to change notification settings - Fork 566
Closed
Description
Hello, I compiled the static library using version 2.1.0 release and used it. A link error occurred while compiling the my program.
Debugging found that the exception.cxx file was not added to the Source Files of the msvc14/log4cplus.sln project (log4cplus and log4cplusS projects).
Causing link errors during program usage
1>loglog.obj : error LNK2019: 无法解析的外部符号 "public: __cdecl log4cplus::exception::exception(class std::basic_string<wchar_t,struct std::char_traits<wchar_t>,class std::allocator<wchar_t> > const &)" (??0exception@log4cplus@@QEAA@AEBV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@@Z),函数 "private: void __cdecl log4cplus::helpers::LogLog::logging_worker<wchar_t const *>(class std::basic_ostream<wchar_t,struct std::char_traits<wchar_t> > &,bool (__cdecl log4cplus::helpers::LogLog::*)(void)const ,wchar_t const *,wchar_t const * const &,bool)const " (??$logging_worker@PEB_W@LogLog@helpers@log4cplus@@AEBAXAEAV?$basic_ostream@_WU?$char_traits@_W@std@@@std@@P8012@EBA_NXZPEB_WAEBQEB_W_N@Z) 中引用了该符号
1>loglog.obj : error LNK2001: 无法解析的外部符号 "public: __cdecl log4cplus::exception::exception(class log4cplus::exception const &)" (??0exception@log4cplus@@QEAA@AEBV01@@Z)
1>loglog.obj : error LNK2001: 无法解析的外部符号 "public: virtual __cdecl log4cplus::exception::~exception(void)" (??1exception@log4cplus@@UEAA@XZ)
- version: log4cplus-2.1.0
- operating system, CPU, bitness: Win11 x64
configure
script, or CMake, etc., flags and settings: Unicode- flags and settings used by your application:
- compiler and its version: Visual Studio 2022 (v143) SDK:10.0.22000.0
Bellegar