我有一个项目,当我构建这个其他项目时,它具有日志项目的依赖项,我得到以下链接器错误:
日志项目很好地构建,但是当我使用此项目中的日志项目作为链接器选项中的库时,它会生成以下错误,在我的日志记录项目中,我确实有一个logger.cpp,其中定义了wxRegKey.
../logging/dist/Debug/MinGW_1-Windows/liblogging.a(Logger.o): In function `ZN7Logging6Logger17CreateRegistryKeyEv':
c:\logging/impl/Logger.cpp:125: undefined reference to `_imp___ZN8wxRegKeyC1ENS_6StdKeyERK8wxString'
c:\logging/impl/Logger.cpp:127: undefined reference to `_imp___ZN8wxRegKeyC1ENS_6StdKeyERK8wxString'
c:\logging/impl/Logger.cpp:129: undefined reference to `_imp___ZNK8wxRegKey6ExistsEv'
c:\logging/impl/Logger.cpp:135: undefined reference to `_imp___ZN8wxRegKeyD1Ev'
c:\logging/impl/Logger.cpp:140: undefined reference to `_imp___ZN8wxRegKeyC1ENS_6StdKeyERK8wxString'
c:\logging/impl/Logger.cpp:142: undefined reference to `_imp___ZNK8wxRegKey6ExistsEv'
c:\logging/impl/Logger.cpp:143: undefined reference to `_imp___ZN8wxRegKey6CreateEb'
c:\logging/impl/Logger.cpp:149: undefined reference to `_imp___ZNK8wxRegKey6ExistsEv'
c:\logging/impl/Logger.cpp:152: undefined reference to `_imp___ZN8wxRegKeyD1Ev'
c:\logging/impl/Logger.cpp:155: undefined reference to `_imp___ZN8wxRegKeyC1ENS_6StdKeyERK8wxString'
c:\logging/impl/Logger.cpp:156: undefined reference to `_imp___ZNK8wxRegKey6ExistsEv'
c:\logging/impl/Logger.cpp:157: undefined reference to `_imp___ZN8wxRegKey6CreateEb'
../logging/dist/Debug/MinGW_1-Windows/liblogging.a(Logger.o): In function
`ZN7Logging6Logger13GetLoggStatusEv':
c:\logging/impl/Logger.cpp:169: undefined reference to
`_imp___ZNK8wxRegKey8HasValueEPKc'
c:\logging/impl/Logger.cpp:170: undefined reference to
`_imp___ZNK8wxRegKey10QueryValueEPKcPl' …Run Code Online (Sandbox Code Playgroud)