我在 Windows 10 上使用 Code::Blocks 和 llvm-clang 编译我的项目时遇到了一些麻烦。这是一些错误消息,因为它的时间太长而无法完全适应,但所有应该需要的是在那里。
clang++.exe -LC:\Qub3d\cinder_master\lib -o bin\Debug\Qub3d.exe obj\Debug\src\mainMenus\mainMenu.o obj\Debug\src\Qub3d_EngineApp.o ..\Qub3d-libs\lib\msw\x64\libEGL.lib ..\Qub3d-libs\lib\msw\x64\libGLESv2.lib ..\Qub3d-libs\lib\msw\x64\libpng.lib ..\Qub3d-libs\lib\msw\x64\Debug\v141\cinder.lib
cinder.lib(wrapper.obj) : error LNK2038: mismatch detected for '_ITERATOR_DEBUG_LEVEL': value '2' doesn't match value '0' in mainMenu.o
cinder.lib(GlslProg.obj) : error LNK2038: mismatch detected for '_ITERATOR_DEBUG_LEVEL': value '2' doesn't match value '0' in mainMenu.o
cinder.lib(GlslProg.obj) : error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MTd_StaticDebug' doesn't match value 'MT_StaticRelease' in mainMenu.
libcpmtd.lib(stdthrow.obj) : error LNK2038: mismatch detected for '_ITERATOR_DEBUG_LEVEL': value '2' doesn't match value '0' in mainMenu.o
libcpmtd.lib(stdthrow.obj) : error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MTd_StaticDebug' doesn't match value 'MT_StaticRelease' in mainMenu.o
LINK : warning LNK4098: defaultlib 'LIBCMTD' conflicts with use of other libs; use /NODEFAULTLIB:library
mainMenu.o : warning LNK4217: locally defined symbol __std_terminate imported in function "int `public: __cdecl std::shared_ptr<class cinder::app::Window>::~shared_ptr<class cinder::app::Window>(void)'::`1'::dtor$2" (?dtor$2@?0???1?$shared_ptr@VWindow@app@cinder@@@std@@QEAA@XZ@4HA)
Qub3d_EngineApp.o : warning LNK4049: locally defined symbol __std_terminate imported
Qub3d_EngineApp.o : warning LNK4217: locally defined symbol _CxxThrowException imported in function "int `private: void __cdecl std::shared_ptr<class cinder::app::Renderer>::_Setp<class cinder::app::RendererGl>(class cinder::app::RendererGl *,struct shared_ptr<class cinder::app::Renderer>::integral_constant<bool,0>)'::`1'::catch$4" (?catch$4@?0???$_Setp@VRendererGl@app@cinder@@@?$shared_ptr@VRenderer@app@cinder@@@std@@AEAAXPEAVRendererGl@app@cinder@@U?$integral_constant@_N$0A@@1@@Z@4HA)
cinder.lib(TextureFormatParsers.obj) : error LNK2001: unresolved external symbol _CrtDbgReportW
cinder.lib(Unicode.obj) : error LNK2001: unresolved external symbol _CrtDbgReportW
cinder.lib(RendererImplGlMsw.obj) : error LNK2001: unresolved external symbol _CrtDbgReportW
cinder.lib(Platform.obj) : error LNK2001: unresolved external symbol _CrtDbgReportW
cinder.lib(Signals.obj) : error LNK2001: unresolved external symbol _CrtDbgReportW
cinder.lib(System.obj) : error LNK2001: unresolved external symbol _CrtDbgReportW
cinder.lib(Context.obj) : error LNK2001: unresolved external symbol _CrtDbgReportW
cinder.lib(Batch.obj) : error LNK2001: unresolved external symbol _CrtDbgReportW
cinder.lib(Log.obj) : error LNK2001: unresolved external symbol _CrtDbgReportW
cinder.lib(Exception.obj) : error LNK2001: unresolved external symbol _CrtDbgReportW
cinder.lib(Window.obj) : error LNK2001: unresolved external symbol _CrtDbgReportW
cinder.lib(Environment.obj) : error LNK2001: unresolved external symbol _CrtDbgReportW
cinder.lib(CinderAssert.obj) : error LNK2001: unresolved external symbol _CrtDbgReportW
cinder.lib(Shader.obj) : error LNK2001: unresolved external symbol _CrtDbgReportW
cinder.lib(wrapper.obj) : error LNK2001: unresolved external symbol _CrtDbgReportW
cinder.lib(RendererGl.obj) : error LNK2001: unresolved external symbol _CrtDbgReportW
cinder.lib(AppBase.obj) : error LNK2001: unresolved external symbol _CrtDbgReportW
cinder.lib(AppMsw.obj) : error LNK2001: unresolved external symbol _CrtDbgReportW
cinder.lib(AppMsw.obj) : error LNK2019: unresolved external symbol __imp_GetCursorPos referenced in function "public: virtual struct glm::tvec2<int,0> __cdecl cinder::app::AppMsw::getMousePos(void)const " (?getMousePos@AppMsw@app@cinder@@UEBA?AU?$tvec2@H$0A@@glm@@XZ)
cinder.lib(AppMsw.obj) : error LNK2019: unresolved external symbol __imp_CommandLineToArgvW referenced in function "public: static void __cdecl cinder::app::AppMsw::initialize(class cinder::app::AppMsw::Settings *,class std::shared_ptr<class cinder::app::Renderer> const &,char const *)" (?initialize@AppMsw@app@cinder@@SAXPEAVSettings@123@AEBV?$shared_ptr@VRenderer@app@cinder@@@std@@PEBD@Z)
cinder.lib(ConstantConversions.obj) : error LNK2001: unresolved external symbol _calloc_dbg
cinder.lib(PlatformMsw.obj) : error LNK2001: unresolved external symbol _free_dbg
cinder.lib(GeomIo.obj) : error LNK2001: unresolved external symbol _free_dbg
cinder.lib(GlslProg.obj) : error LNK2001: unresolved external symbol _free_dbg
cinder.lib(BufferObj.obj) : error LNK2001: unresolved external symbol _free_dbg
cinder.lib(Vao.obj) : error LNK2001: unresolved external symbol _free_dbg
cinder.lib(Fbo.obj) : error LNK2001: unresolved external symbol _free_dbg
cinder.lib(Context.obj) : error LNK2001: unresolved external symbol _free_dbg
cinder.lib(Log.obj) : error LNK2001: unresolved external symbol _free_dbg
cinder.lib(Utilities.obj) : error LNK2001: unresolved external symbol _free_dbg
cinder.lib(Texture.obj) : error LNK2001: unresolved external symbol _free_dbg
cinder.lib(ShaderPreprocessor.obj) : error LNK2001: unresolved external symbol _malloc_dbg
cinder.lib(ConstantConversions.obj) : error LNK2001: unresolved external symbol _malloc_dbg
cinder.lib(VboMesh.obj) : error LNK2001: unresolved external symbol _malloc_dbg
cinder.lib(PlatformMsw.obj) : error LNK2001: unresolved external symbol _malloc_dbg
cinder.lib(GeomIo.obj) : error LNK2001: unresolved external symbol _malloc_dbg
cinder.lib(GlslProg.obj) : error LNK2001: unresolved external symbol _malloc_dbg
cinder.lib(BufferObj.obj) : error LNK2001: unresolved external symbol _malloc_dbg
cinder.lib(Vao.obj) : error LNK2001: unresolved external symbol _malloc_dbg
cinder.lib(Fbo.obj) : error LNK2001: unresolved external symbol _malloc_dbg
cinder.lib(Context.obj) : error LNK2001: unresolved external symbol _malloc_dbg
cinder.lib(Log.obj) : error LNK2001: unresolved external symbol _malloc_dbg
cinder.lib(Utilities.obj) : error LNK2001: unresolved external symbol _malloc_dbg
cinder.lib(Texture.obj) : error LNK2001: unresolved external symbol _malloc_dbg
cinder.lib(Log.obj) : error LNK2019: unresolved external symbol __imp_CloseEventLog referenced in function "public: virtual __cdecl cinder::log::LoggerSystem::ImplEventLog::~ImplEventLog(void)" (??1ImplEventLog@LoggerSystem@log@cinder@@UEAA@XZ)
cinder.lib(Log.obj) : error LNK2019: unresolved external symbol __imp_RegisterEventSourceW referenced in function "public: __cdecl cinder::log::LoggerSystem::ImplEventLog::ImplEventLog(void)" (??0ImplEventLog@LoggerSystem@log@cinder@@QEAA@XZ)
cinder.lib(Log.obj) : error LNK2019: unresolved external symbol __imp_ReportEventW referenced in function "public: virtual void __cdecl cinder::log::LoggerSystem::ImplEventLog::write(struct cinder::log::Metadata const &,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &)" (?write@ImplEventLog@LoggerSystem@log@cinder@@UEAAXAEBUMetadata@34@AEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z)
cinder.lib(RendererImplGlMsw.obj) : error LNK2019: unresolved external symbol __imp_ChoosePixelFormat referenced in function "bool __cdecl cinder::app::`anonymous namespace'::getWglFunctionPointers(struct HGLRC__ * (__cdecl**)(struct HDC__ *,struct HGLRC__ *,int const *),int (__cdecl**)(struct HDC__ *,int const *,float const *,unsigned int,int *,unsigned int *))" (?getWglFunctionPointers@?A0x83b54a9b@app@cinder@@YA_NPEAP6APEAUHGLRC__@@PEAUHDC__@@PEAU4@PEBH@ZPEAP6AH02PEBMIPEAHPEAI@Z@Z)
cinder.lib(RendererImplGlMsw.obj) : error LNK2019: unresolved external symbol __imp_DescribePixelFormat referenced in function "bool __cdecl cinder::app::`anonymous namespace'::setPixelFormat(struct HDC__ *,struct cinder::app::RendererGl::Options const &)" (?setPixelFormat@?A0x83b54a9b@app@cinder@@YA_NPEAUHDC__@@AEBUOptions@RendererGl@23@@Z)
cinder.lib(RendererImplGlMsw.obj) : error LNK2019: unresolved external symbol __imp_SetPixelFormat referenced in function "bool __cdecl cinder::app::`anonymous namespace'::getWglFunctionPointers(struct HGLRC__ * (__cdecl**)(struct HDC__ *,struct HGLRC__ *,int const *),int (__cdecl**)(struct HDC__ *,int const *,float const *,unsigned int,int *,unsigned int *))" (?getWglFunctionPointers@?A0x83b54a9b@app@cinder@@YA_NPEAP6APEAUHGLRC__@@PEAUHDC__@@PEAU4@PEBH@ZPEAP6AH02PEBMIPEAHPEAI@Z@Z)
cinder.lib(RendererImplGlMsw.obj) : error LNK2019: unresolved external symbol __imp_SwapBuffers referenced in function "public: virtual void __cdecl cinder::app::RendererImplGlMsw::swapBuffers(void)const " (?swapBuffers@RendererImplGlMsw@app@cinder@@UEBAXXZ)
cinder.lib(RendererImplGlMsw.obj) : error LNK2019: unresolved external symbol __imp_DefWindowProcW referenced in function "struct HWND__ * __cdecl cinder::app::`anonymous namespace'::createDummyWindow(void)" (?createDummyWindow@?A0x83b54a9b@app@cinder@@YAPEAUHWND__@@XZ)
cinder.lib(AppImplMsw.obj) : error LNK2001: unresolved external symbol __imp_DefWindowProcW
cinder.lib(RendererImplGlMsw.obj) : error LNK2019: unresolved external symbol __imp_RegisterClassW referenced in function "struct HWND__ * __cdecl cinder::app::`anonymous namespace'::createDummyWindow(void)" (?createDummyWindow@?A0x83b54a9b@app@cinder@@YAPEAUHWND__@@XZ)
cinder.lib(AppImplMsw.obj) : error LNK2019: unresolved external symbol __imp_MapVirtualKeyW referenced in function "wchar_t __cdecl cinder::app::mapVirtualKey(unsigned __int64)" (?mapVirtualKey@app@cinder@@YA_W_K@Z)
cinder.lib(AppImplMsw.obj) : error LNK2019: unresolved external symbol __imp_SetCapture referenced in function "__int64 __cdecl cinder::app::WndProc(struct HWND__ *,unsigned int,unsigned __int64,__int64)" (?WndProc@app@cinder@@YA_JPEAUHWND__@@I_K_J@Z)
cinder.lib(AppImplMsw.obj) : error LNK2019: unresolved external symbol __imp_ReleaseCapture referenced in function "__int64 __cdecl cinder::app::WndProc(struct HWND__ *,unsigned int,unsigned __int64,__int64)" (?WndProc@app@cinder@@YA_JPEAUHWND__@@I_K_J@Z)
cinder.lib(AppImplMsw.obj) : error LNK2019: unresolved external symbol __imp_SetForegroundWindow referenced in function "public: __cdecl cinder::app::BlankingWindow::BlankingWindow(class std::shared_ptr<class cinder::Display>)" (??0BlankingWindow@app@cinder@@QEAA@V?$shared_ptr@VDisplay@cinder@@@std@@@Z)
cinder.lib(AppImplMsw.obj) : error LNK2019: unresolved external symbol __imp_BeginPaint referenced in function "__int64 __cdecl cinder::app::BlankingWndProc(struct HWND__ *,unsigned int,unsigned __int64,__int64)" (?BlankingWndProc@app@cinder@@YA_JPEAUHWND__@@I_K_J@Z)
cinder.lib(RendererImpl2dGdi.obj) : error LNK2001: unresolved external symbol __imp_BeginPaint
cinder.lib(AppImplMsw.obj) : error LNK2019: unresolved external symbol __imp_EndPaint referenced in function "__int64 __cdecl cinder::app::BlankingWndProc(struct HWND__ *,unsigned int,unsigned __int64,__int64)" (?BlankingWndProc@app@cinder@@YA_JPEAUHWND__@@I_K_J@Z)
cinder.lib(RendererImpl2dGdi.obj) : error LNK2001: unresolved external symbol __imp_EndPaint
cinder.lib(AppImplMsw.obj) : error LNK2019: unresolved external symbol __imp_InvalidateRect referenced in function "public: void __cdecl cinder::app::WindowImplMsw::setBorderless(bool)" (?setBorderless@WindowImplMsw@app@cinder@@QEAAX_N@Z)
cinder.lib(AppImplMsw.obj) : error LNK2019: unresolved external symbol __imp_RedrawWindow referenced in function "public: virtual void __cdecl cinder::app::WindowImplMsw::redraw(void)" (?redraw@WindowImplMsw@app@cinder@@UEAAXXZ)
cinder.lib(AppImplMsw.obj) : error LNK2019: unresolved external symbol __imp_SetWindowTextW referenced in function "public: virtual void __cdecl cinder::app::WindowImplMsw::setTitle(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &)" (?setTitle@WindowImplMsw@app@cinder@@UEAAXAEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z)
cinder.lib(AppImplMsw.obj) : error LNK2019: unresolved external symbol __imp_GetWindowTextW referenced in function "public: virtual class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > __cdecl cinder::app::WindowImplMsw::getTitle(void)const " (?getTitle@WindowImplMsw@app@cinder@@UEBA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@XZ)
cinder.lib(AppImplMsw.obj) : error LNK2019: unresolved external symbol __imp_GetOpenFileNameW referenced in function "public: static class std::experimental::filesystem::v1::path __cdecl cinder::app::AppImplMsw::getOpenFilePath(class std::experimental::filesystem::v1::path const &,class std::vector<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >,class std::allocator<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > > >)" (?getOpenFilePath@AppImplMsw@app@cinder@@SA?AVpath@v1@filesystem@experimental@std@@AEBV45678@V?$vector@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@V?$allocator@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@2@@8@@Z)
cinder.lib(AppImplMsw.obj) : error LNK2019: unresolved external symbol __imp_GetSaveFileNameW referenced in function "public: static class std::experimental::filesystem::v1::path __cdecl cinder::app::AppImplMsw::getSaveFilePath(class std::experimental::filesystem::v1::path const &,class std::vector<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >,class std::allocator<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > > >)" (?getSaveFilePath@AppImplMsw@app@cinder@@SA?AVpath@v1@filesystem@experimental@std@@AEBV45678@V?$vector@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@V?$allocator@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@2@@8@@Z)
cinder.lib(ImageTargetFileWic.obj) : error LNK2001: unresolved external symbol __imp_CoCreateInstance
cinder.lib(ImageTargetFileWic.obj) : error LNK2019: unresolved external symbol __imp_VariantInit referenced in function "protected: __cdecl cinder::ImageTargetFileWic::ImageTargetFileWic(class std::shared_ptr<class cinder::DataTarget>,class std::shared_ptr<class cinder::ImageSource>,class cinder::ImageTarget::Options,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &)" (??0ImageTargetFileWic@cinder@@IEAA@V?$shared_ptr@VDataTarget@cinder@@@std@@V?$shared_ptr@VImageSource@cinder@@@3@VOptions@ImageTarget@1@AEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@3@@Z)
bin\Debug\Qub3d.exe : fatal error LNK1120: 93 unresolved externals
我已经链接了 cinder.lib、libEGL.lib、libGLESv2.lib 和 libpng.lib,我看不出有任何理由说明这不能正常工作。