FLTK 2.0 为 VS2019 的 circa-2011 代码库构建和演示
FLTK 2.0 build and demo for circa-2011 code base for VS2019
我发现了一个可以满足某些需求的程序;源代码在 sourceforge 上可用,但依赖列表缺乏足够的细节。我设法找到了(大部分)它们并根据软件的发布日期选择了版本。目标是让代码像 2011 年最初那样忠实地编译, 然后 担心 upgrading/fixing/migrating 到更新的库。
一个软件包,FLTK,正在使用废弃的 2.0 版本。我找到了两个不同的版本。包含的项目文件为 'one way upgraded' 到 MS2019。许多属性和链接需要修复。
我正在尝试编译测试 'cubeview' 程序,结果有 37 个未解决的依赖项。
如下,我进入了项目,属性,配置属性
Severity Code Description Project File Line Suppression State
Error LNK1120 37 unresolved externals CubeView D:\CodeProjects\fltk-2.0.x-master\fltk-2.0.x-master\ide\vcnet\Debug\CubeView.exe 1
Error LNK2019 unresolved external symbol "public: bool __thiscall fltk::Widget::find(class fltk::AssociationType const &,void *)const " (?find@Widget@fltk@@QBE_NABVAssociationType@2@PAX@Z) referenced in function "public: bool __thiscall fltk::Widget::add_shortcut(unsigned int)" (?add_shortcut@Widget@fltk@@QAE_NI@Z) CubeView D:\CodeProjects\fltk-2.0.x-master\fltk-2.0.x-master\ide\vcnet\ShortcutAssignment.obj 1
Error LNK2019 unresolved external symbol "public: bool __thiscall fltk::Widget::remove(class fltk::AssociationType const &,void *)" (?remove@Widget@fltk@@QAE_NABVAssociationType@2@PAX@Z) referenced in function "public: bool __thiscall fltk::Widget::remove_shortcut(unsigned int)" (?remove_shortcut@Widget@fltk@@QAE_NI@Z) CubeView D:\CodeProjects\fltk-2.0.x-master\fltk-2.0.x-master\ide\vcnet\ShortcutAssignment.obj 1
Error LNK2019 unresolved external symbol "public: void * __thiscall fltk::Widget::foreach(class fltk::AssociationType const &,class fltk::AssociationFunctor &)const " (?foreach@Widget@fltk@@QBEPAXABVAssociationType@2@AAVAssociationFunctor@2@@Z) referenced in function "public: bool __thiscall fltk::Widget::test_shortcut(bool)const " (?test_shortcut@Widget@fltk@@QBE_N_N@Z) CubeView D:\CodeProjects\fltk-2.0.x-master\fltk-2.0.x-master\ide\vcnet\ShortcutAssignment.obj 1
Error LNK2019 unresolved external symbol "public: void * __thiscall fltk::Widget::get(class fltk::AssociationType const &)const " (?get@Widget@fltk@@QBEPAXABVAssociationType@2@@Z) referenced in function "public: unsigned int __thiscall fltk::Widget::shortcut(void)const " (?shortcut@Widget@fltk@@QBEIXZ) CubeView D:\CodeProjects\fltk-2.0.x-master\fltk-2.0.x-master\ide\vcnet\ShortcutAssignment.obj 1
Error LNK2019 unresolved external symbol "public: void __thiscall fltk::Widget::add(class fltk::AssociationType const &,void *)" (?add@Widget@fltk@@QAEXABVAssociationType@2@PAX@Z) referenced in function "public: bool __thiscall fltk::Widget::add_shortcut(unsigned int)" (?add_shortcut@Widget@fltk@@QAE_NI@Z) CubeView D:\CodeProjects\fltk-2.0.x-master\fltk-2.0.x-master\ide\vcnet\ShortcutAssignment.obj 1
Error LNK2019 unresolved external symbol "public: void __thiscall fltk::Widget::set(class fltk::AssociationType const &,void *)" (?set@Widget@fltk@@QAEXABVAssociationType@2@PAX@Z) referenced in function "public: void __thiscall fltk::Widget::remove_shortcuts(void)" (?remove_shortcuts@Widget@fltk@@QAEXXZ) CubeView D:\CodeProjects\fltk-2.0.x-master\fltk-2.0.x-master\ide\vcnet\ShortcutAssignment.obj 1
Error LNK2019 unresolved external symbol "void * __cdecl fltk::foreach(class fltk::AssociationType const *,class fltk::Widget const *,class fltk::AssociationFunctor &)" (?foreach@fltk@@YAPAXPBVAssociationType@1@PBVWidget@1@AAVAssociationFunctor@1@@Z) referenced in function "unsigned int __cdecl fltk::foreachShortcut(class fltk::Widget const *,class fltk::ShortcutFunctor &)" (?foreachShortcut@fltk@@YAIPBVWidget@1@AAVShortcutFunctor@1@@Z) CubeView D:\CodeProjects\fltk-2.0.x-master\fltk-2.0.x-master\ide\vcnet\ShortcutAssignment.obj 1
Error LNK2019 unresolved external symbol "void __cdecl delete_associations_for(class fltk::Widget *)" (?delete_associations_for@@YAXPAVWidget@fltk@@@Z) referenced in function "public: virtual __thiscall fltk::Widget::~Widget(void)" (??1Widget@fltk@@UAE@XZ) CubeView D:\CodeProjects\fltk-2.0.x-master\fltk-2.0.x-master\ide\vcnet\Widget.obj 1
Error LNK2019 unresolved external symbol _WSAAsyncSelect@16 referenced in function "void __cdecl fltk::add_fd(int,int,void (__cdecl*)(int,void *),void *)" (?add_fd@fltk@@YAXHHP6AXHPAX@Z0@Z) CubeView D:\CodeProjects\fltk-2.0.x-master\fltk-2.0.x-master\ide\vcnet\run.obj 1
Error LNK2019 unresolved external symbol __imp__glBegin@4 referenced in function "private: void __thiscall CubeView::drawCube(void)" (?drawCube@CubeView@@AAEXXZ) CubeView D:\CodeProjects\fltk-2.0.x-master\fltk-2.0.x-master\ide\vcnet\CubeView.obj 1
Error LNK2019 unresolved external symbol __imp__glBlendFunc@8 referenced in function "public: virtual void __thiscall CubeView::draw(void)" (?draw@CubeView@@UAEXXZ) CubeView D:\CodeProjects\fltk-2.0.x-master\fltk-2.0.x-master\ide\vcnet\CubeView.obj 1
Error LNK2019 unresolved external symbol __imp__glClear@4 referenced in function "public: virtual void __thiscall CubeView::draw(void)" (?draw@CubeView@@UAEXXZ) CubeView D:\CodeProjects\fltk-2.0.x-master\fltk-2.0.x-master\ide\vcnet\CubeView.obj 1
Error LNK2019 unresolved external symbol __imp__glColor3f@12 referenced in function "private: void __thiscall CubeView::drawCube(void)" (?drawCube@CubeView@@AAEXXZ) CubeView D:\CodeProjects\fltk-2.0.x-master\fltk-2.0.x-master\ide\vcnet\CubeView.obj 1
Error LNK2019 unresolved external symbol __imp__glColor4f@16 referenced in function "private: void __thiscall CubeView::drawCube(void)" (?drawCube@CubeView@@AAEXXZ) CubeView D:\CodeProjects\fltk-2.0.x-master\fltk-2.0.x-master\ide\vcnet\CubeView.obj 1
Error LNK2019 unresolved external symbol __imp__glCopyPixels@20 referenced in function "public: virtual void __thiscall fltk::GlWindow::flush(void)" (?flush@GlWindow@fltk@@UAEXXZ) CubeView D:\CodeProjects\fltk-2.0.x-master\fltk-2.0.x-master\ide\vcnet\fltk2_gld.lib(Fl_Gl_Window.obj) 1
Error LNK2019 unresolved external symbol __imp__glDisable@4 referenced in function "public: virtual void __thiscall fltk::GlWindow::flush(void)" (?flush@GlWindow@fltk@@UAEXXZ) CubeView D:\CodeProjects\fltk-2.0.x-master\fltk-2.0.x-master\ide\vcnet\fltk2_gld.lib(Fl_Gl_Window.obj) 1
Error LNK2019 unresolved external symbol __imp__glDrawBuffer@4 referenced in function "public: virtual void __thiscall fltk::GlWindow::flush(void)" (?flush@GlWindow@fltk@@UAEXXZ) CubeView D:\CodeProjects\fltk-2.0.x-master\fltk-2.0.x-master\ide\vcnet\fltk2_gld.lib(Fl_Gl_Window.obj) 1
Error LNK2019 unresolved external symbol __imp__glEnable@4 referenced in function "public: virtual void __thiscall CubeView::draw(void)" (?draw@CubeView@@UAEXXZ) CubeView D:\CodeProjects\fltk-2.0.x-master\fltk-2.0.x-master\ide\vcnet\CubeView.obj 1
Error LNK2019 unresolved external symbol __imp__glEnd@0 referenced in function "private: void __thiscall CubeView::drawCube(void)" (?drawCube@CubeView@@AAEXXZ) CubeView D:\CodeProjects\fltk-2.0.x-master\fltk-2.0.x-master\ide\vcnet\CubeView.obj 1
Error LNK2019 unresolved external symbol __imp__glFlush@0 referenced in function "public: virtual void __thiscall fltk::GlWindow::flush(void)" (?flush@GlWindow@fltk@@UAEXXZ) CubeView D:\CodeProjects\fltk-2.0.x-master\fltk-2.0.x-master\ide\vcnet\fltk2_gld.lib(Fl_Gl_Window.obj) 1
Error LNK2001 unresolved external symbol __imp__glLoadIdentity@0 CubeView D:\CodeProjects\fltk-2.0.x-master\fltk-2.0.x-master\ide\vcnet\fltk2_gld.lib(Fl_Gl_Window.obj) 1
Error LNK2019 unresolved external symbol __imp__glLoadIdentity@0 referenced in function "public: virtual void __thiscall CubeView::draw(void)" (?draw@CubeView@@UAEXXZ) CubeView D:\CodeProjects\fltk-2.0.x-master\fltk-2.0.x-master\ide\vcnet\CubeView.obj 1
Error LNK2001 unresolved external symbol __imp__glOrtho@48 CubeView D:\CodeProjects\fltk-2.0.x-master\fltk-2.0.x-master\ide\vcnet\fltk2_gld.lib(Fl_Gl_Window.obj) 1
Error LNK2019 unresolved external symbol __imp__glOrtho@48 referenced in function "public: virtual void __thiscall CubeView::draw(void)" (?draw@CubeView@@UAEXXZ) CubeView D:\CodeProjects\fltk-2.0.x-master\fltk-2.0.x-master\ide\vcnet\CubeView.obj 1
Error LNK2019 unresolved external symbol __imp__glPopMatrix@0 referenced in function "public: virtual void __thiscall CubeView::draw(void)" (?draw@CubeView@@UAEXXZ) CubeView D:\CodeProjects\fltk-2.0.x-master\fltk-2.0.x-master\ide\vcnet\CubeView.obj 1
Error LNK2019 unresolved external symbol __imp__glPushMatrix@0 referenced in function "public: virtual void __thiscall CubeView::draw(void)" (?draw@CubeView@@UAEXXZ) CubeView D:\CodeProjects\fltk-2.0.x-master\fltk-2.0.x-master\ide\vcnet\CubeView.obj 1
Error LNK2019 unresolved external symbol __imp__glRasterPos2i@8 referenced in function "public: virtual void __thiscall fltk::GlWindow::flush(void)" (?flush@GlWindow@fltk@@UAEXXZ) CubeView D:\CodeProjects\fltk-2.0.x-master\fltk-2.0.x-master\ide\vcnet\fltk2_gld.lib(Fl_Gl_Window.obj) 1
Error LNK2019 unresolved external symbol __imp__glReadBuffer@4 referenced in function "public: virtual void __thiscall fltk::GlWindow::flush(void)" (?flush@GlWindow@fltk@@UAEXXZ) CubeView D:\CodeProjects\fltk-2.0.x-master\fltk-2.0.x-master\ide\vcnet\fltk2_gld.lib(Fl_Gl_Window.obj) 1
Error LNK2019 unresolved external symbol __imp__glRotatef@16 referenced in function "public: virtual void __thiscall CubeView::draw(void)" (?draw@CubeView@@UAEXXZ) CubeView D:\CodeProjects\fltk-2.0.x-master\fltk-2.0.x-master\ide\vcnet\CubeView.obj 1
Error LNK2019 unresolved external symbol __imp__glScalef@12 referenced in function "public: virtual void __thiscall CubeView::draw(void)" (?draw@CubeView@@UAEXXZ) CubeView D:\CodeProjects\fltk-2.0.x-master\fltk-2.0.x-master\ide\vcnet\CubeView.obj 1
Error LNK2019 unresolved external symbol __imp__glShadeModel@4 referenced in function "private: void __thiscall CubeView::drawCube(void)" (?drawCube@CubeView@@AAEXXZ) CubeView D:\CodeProjects\fltk-2.0.x-master\fltk-2.0.x-master\ide\vcnet\CubeView.obj 1
Error LNK2019 unresolved external symbol __imp__glTranslatef@12 referenced in function "public: virtual void __thiscall CubeView::draw(void)" (?draw@CubeView@@UAEXXZ) CubeView D:\CodeProjects\fltk-2.0.x-master\fltk-2.0.x-master\ide\vcnet\CubeView.obj 1
Error LNK2019 unresolved external symbol __imp__glVertex3fv@4 referenced in function "private: void __thiscall CubeView::drawCube(void)" (?drawCube@CubeView@@AAEXXZ) CubeView D:\CodeProjects\fltk-2.0.x-master\fltk-2.0.x-master\ide\vcnet\CubeView.obj 1
Error LNK2001 unresolved external symbol __imp__glViewport@16 CubeView D:\CodeProjects\fltk-2.0.x-master\fltk-2.0.x-master\ide\vcnet\fltk2_gld.lib(Fl_Gl_Window.obj) 1
Error LNK2019 unresolved external symbol __imp__glViewport@16 referenced in function "public: virtual void __thiscall CubeView::draw(void)" (?draw@CubeView@@UAEXXZ) CubeView D:\CodeProjects\fltk-2.0.x-master\fltk-2.0.x-master\ide\vcnet\CubeView.obj 1
Error LNK2019 unresolved external symbol __imp__wglCreateContext@4 referenced in function "struct HGLRC__ * __cdecl fltk::create_gl_context(class fltk::Window const *,class fltk::GlChoice const *,int)" (?create_gl_context@fltk@@YAPAUHGLRC__@@PBVWindow@1@PBVGlChoice@1@H@Z) CubeView D:\CodeProjects\fltk-2.0.x-master\fltk-2.0.x-master\ide\vcnet\fltk2_gld.lib(Fl_Gl_Choice.obj) 1
Error LNK2019 unresolved external symbol __imp__wglCreateLayerContext@8 referenced in function "struct HGLRC__ * __cdecl fltk::create_gl_context(class fltk::Window const *,class fltk::GlChoice const *,int)" (?create_gl_context@fltk@@YAPAUHGLRC__@@PBVWindow@1@PBVGlChoice@1@H@Z) CubeView D:\CodeProjects\fltk-2.0.x-master\fltk-2.0.x-master\ide\vcnet\fltk2_gld.lib(Fl_Gl_Choice.obj) 1
Error LNK2019 unresolved external symbol __imp__wglDeleteContext@4 referenced in function "void __cdecl fltk::delete_gl_context(struct HGLRC__ *)" (?delete_gl_context@fltk@@YAXPAUHGLRC__@@@Z) CubeView D:\CodeProjects\fltk-2.0.x-master\fltk-2.0.x-master\ide\vcnet\fltk2_gld.lib(Fl_Gl_Choice.obj) 1
Error LNK2019 unresolved external symbol __imp__wglMakeCurrent@8 referenced in function "void __cdecl fltk::no_gl_context(void)" (?no_gl_context@fltk@@YAXXZ) CubeView D:\CodeProjects\fltk-2.0.x-master\fltk-2.0.x-master\ide\vcnet\fltk2_gld.lib(Fl_Gl_Choice.obj) 1
Error LNK2019 unresolved external symbol __imp__wglShareLists@8 referenced in function "struct HGLRC__ * __cdecl fltk::create_gl_context(class fltk::Window const *,class fltk::GlChoice const *,int)" (?create_gl_context@fltk@@YAPAUHGLRC__@@PBVWindow@1@PBVGlChoice@1@H@Z) CubeView D:\CodeProjects\fltk-2.0.x-master\fltk-2.0.x-master\ide\vcnet\fltk2_gld.lib(Fl_Gl_Choice.obj) 1
我未能包含的另一个 'output' 部分:
1>------ Build started: Project: fltk, Configuration: Debug Win32 ------
1>C:\Apps\MSBuild\MSBuild\Microsoft\VC\v160\Microsoft.CppBuild.targets(445,5): warning MSB8004: Output Directory does not end with a trailing slash. This build instance will add the slash as it is required to allow proper evaluation of the Output Directory.
1>C:\Apps\MSBuild\MSBuild\Microsoft\VC\v160\Microsoft.CppBuild.targets(459,5): warning MSB8028: The intermediate directory (Debug\) contains files shared from another project (boxtype.vcxproj, checkers.vcxproj, color_chooser.vcxproj, CubeView.vcxproj, cursor.vcxproj, demo.vcxproj, editor.vcxproj, file_chooser.vcxproj, fltkdll.vcxproj, fltk_images.vcxproj, fltk_opengl.vcxproj, fonts.vcxproj, hello.vcxproj, image.vcxproj, input.vcxproj, label.vcxproj, libjpeg.vcxproj, libpng.vcxproj, pack.vcxproj, qubix.vcxproj, tile.vcxproj, zlib.vcxproj). This can lead to incorrect clean and rebuild behavior.
1>C:\Apps\MSBuild\MSBuild\Microsoft\VC\v160\Microsoft.CppBuild.targets(1455,5): warning MSB8012: TargetPath(D:\CodeProjects\fltk-2.0.x-master\fltk-2.0.x-master\ide\vcnet\..\..\lib\fltk.lib) does not match the Library's OutputFile property value (D:\CodeProjects\fltk-2.0.x-master\fltk-2.0.x-master\lib\fltk2d.lib). This may cause your project to build incorrectly. To correct this, please make sure that $(OutDir), $(TargetName) and $(TargetExt) property values match the value specified in %(Lib.OutputFile).
1>C:\Apps\MSBuild\MSBuild\Microsoft\VC\v160\Microsoft.CppBuild.targets(1457,5): warning MSB8012: TargetName(fltk) does not match the Library's OutputFile property value (fltk2d). This may cause your project to build incorrectly. To correct this, please make sure that $(OutDir), $(TargetName) and $(TargetExt) property values match the value specified in %(Lib.OutputFile).
1>fltk.lib.vcxproj -> D:\CodeProjects\fltk-2.0.x-master\fltk-2.0.x-master\ide\vcnet\..\..\lib\fltk.lib
1>Done building project "fltk.lib.vcxproj".
2>------ Build started: Project: CubeView, Configuration: Debug Win32 ------
2>C:\Apps\MSBuild\MSBuild\Microsoft\VC\v160\Microsoft.CppBuild.targets(459,5): warning MSB8028: The intermediate directory (.\Debug\) contains files shared from another project (boxtype.vcxproj, checkers.vcxproj, color_chooser.vcxproj, cursor.vcxproj, demo.vcxproj, editor.vcxproj, file_chooser.vcxproj, fltk.vcxproj, fltkdll.vcxproj, fltk_images.vcxproj, fltk_opengl.vcxproj, fonts.vcxproj, hello.vcxproj, image.vcxproj, input.vcxproj, label.vcxproj, libjpeg.vcxproj, libpng.vcxproj, pack.vcxproj, qubix.vcxproj, tile.vcxproj, zlib.vcxproj). This can lead to incorrect clean and rebuild behavior.
2>cl : command line warning D9035: option 'Gm' has been deprecated and will be removed in a future release
2>cl : command line warning D9007: '/Gm' requires '/Zi or /ZI'; option ignored
2>CubeMain.cxx
2>CubeView.cxx
2>CubeViewUI.cxx
2>Generating Code...
2>C:\Apps\MSBuild\MSBuild\Microsoft\VC\v160\Microsoft.CppBuild.targets(445,5): warning MSB8004: Output Directory does not end with a trailing slash. This build instance will add the slash as it is required to allow proper evaluation of the Output Directory.
2>C:\Apps\MSBuild\MSBuild\Microsoft\VC\v160\Microsoft.CppBuild.targets(459,5): warning MSB8028: The intermediate directory (Debug\) contains files shared from another project (boxtype.vcxproj, checkers.vcxproj, color_chooser.vcxproj, CubeView.vcxproj, cursor.vcxproj, demo.vcxproj, editor.vcxproj, file_chooser.vcxproj, fltk.vcxproj, fltkdll.vcxproj, fltk_images.vcxproj, fonts.vcxproj, hello.vcxproj, image.vcxproj, input.vcxproj, label.vcxproj, libjpeg.vcxproj, libpng.vcxproj, pack.vcxproj, qubix.vcxproj, tile.vcxproj, zlib.vcxproj). This can lead to incorrect clean and rebuild behavior.
2>Done building project "fltk_opengl.vcxproj".
2>CubeView.obj : error LNK2019: unresolved external symbol __imp__glBegin@4 referenced in function "private: void __thiscall CubeView::drawCube(void)" (?drawCube@CubeView@@AAEXXZ)
2>CubeView.obj : error LNK2019: unresolved external symbol __imp__glBlendFunc@8 referenced in function "public: virtual void __thiscall CubeView::draw(void)" (?draw@CubeView@@UAEXXZ)
2>CubeView.obj : error LNK2019: unresolved external symbol __imp__glClear@4 referenced in function "public: virtual void __thiscall CubeView::draw(void)" (?draw@CubeView@@UAEXXZ)
2>CubeView.obj : error LNK2019: unresolved external symbol __imp__glColor3f@12 referenced in function "private: void __thiscall CubeView::drawCube(void)" (?drawCube@CubeView@@AAEXXZ)
2>CubeView.obj : error LNK2019: unresolved external symbol __imp__glColor4f@16 referenced in function "private: void __thiscall CubeView::drawCube(void)" (?drawCube@CubeView@@AAEXXZ)
2>CubeView.obj : error LNK2019: unresolved external symbol __imp__glEnable@4 referenced in function "public: virtual void __thiscall CubeView::draw(void)" (?draw@CubeView@@UAEXXZ)
2>CubeView.obj : error LNK2019: unresolved external symbol __imp__glEnd@0 referenced in function "private: void __thiscall CubeView::drawCube(void)" (?drawCube@CubeView@@AAEXXZ)
2>CubeView.obj : error LNK2019: unresolved external symbol __imp__glLoadIdentity@0 referenced in function "public: virtual void __thiscall CubeView::draw(void)" (?draw@CubeView@@UAEXXZ)
2>fltk2_gld.lib(Fl_Gl_Window.obj) : error LNK2001: unresolved external symbol __imp__glLoadIdentity@0
2>CubeView.obj : error LNK2019: unresolved external symbol __imp__glOrtho@48 referenced in function "public: virtual void __thiscall CubeView::draw(void)" (?draw@CubeView@@UAEXXZ)
2>fltk2_gld.lib(Fl_Gl_Window.obj) : error LNK2001: unresolved external symbol __imp__glOrtho@48
2>CubeView.obj : error LNK2019: unresolved external symbol __imp__glPopMatrix@0 referenced in function "public: virtual void __thiscall CubeView::draw(void)" (?draw@CubeView@@UAEXXZ)
2>CubeView.obj : error LNK2019: unresolved external symbol __imp__glPushMatrix@0 referenced in function "public: virtual void __thiscall CubeView::draw(void)" (?draw@CubeView@@UAEXXZ)
2>CubeView.obj : error LNK2019: unresolved external symbol __imp__glRotatef@16 referenced in function "public: virtual void __thiscall CubeView::draw(void)" (?draw@CubeView@@UAEXXZ)
2>CubeView.obj : error LNK2019: unresolved external symbol __imp__glScalef@12 referenced in function "public: virtual void __thiscall CubeView::draw(void)" (?draw@CubeView@@UAEXXZ)
2>CubeView.obj : error LNK2019: unresolved external symbol __imp__glShadeModel@4 referenced in function "private: void __thiscall CubeView::drawCube(void)" (?drawCube@CubeView@@AAEXXZ)
2>CubeView.obj : error LNK2019: unresolved external symbol __imp__glTranslatef@12 referenced in function "public: virtual void __thiscall CubeView::draw(void)" (?draw@CubeView@@UAEXXZ)
2>CubeView.obj : error LNK2019: unresolved external symbol __imp__glVertex3fv@4 referenced in function "private: void __thiscall CubeView::drawCube(void)" (?drawCube@CubeView@@AAEXXZ)
2>CubeView.obj : error LNK2019: unresolved external symbol __imp__glViewport@16 referenced in function "public: virtual void __thiscall CubeView::draw(void)" (?draw@CubeView@@UAEXXZ)
2>fltk2_gld.lib(Fl_Gl_Window.obj) : error LNK2001: unresolved external symbol __imp__glViewport@16
2>run.obj : error LNK2019: unresolved external symbol _WSAAsyncSelect@16 referenced in function "void __cdecl fltk::add_fd(int,int,void (__cdecl*)(int,void *),void *)" (?add_fd@fltk@@YAXHHP6AXHPAX@Z0@Z)
2>Widget.obj : error LNK2019: unresolved external symbol "void __cdecl delete_associations_for(class fltk::Widget *)" (?delete_associations_for@@YAXPAVWidget@fltk@@@Z) referenced in function "public: virtual __thiscall fltk::Widget::~Widget(void)" (??1Widget@fltk@@UAE@XZ)
2>fltk2_gld.lib(Fl_Gl_Window.obj) : error LNK2019: unresolved external symbol __imp__glCopyPixels@20 referenced in function "public: virtual void __thiscall fltk::GlWindow::flush(void)" (?flush@GlWindow@fltk@@UAEXXZ)
2>fltk2_gld.lib(Fl_Gl_Window.obj) : error LNK2019: unresolved external symbol __imp__glDisable@4 referenced in function "public: virtual void __thiscall fltk::GlWindow::flush(void)" (?flush@GlWindow@fltk@@UAEXXZ)
2>fltk2_gld.lib(Fl_Gl_Window.obj) : error LNK2019: unresolved external symbol __imp__glDrawBuffer@4 referenced in function "public: virtual void __thiscall fltk::GlWindow::flush(void)" (?flush@GlWindow@fltk@@UAEXXZ)
2>fltk2_gld.lib(Fl_Gl_Window.obj) : error LNK2019: unresolved external symbol __imp__glFlush@0 referenced in function "public: virtual void __thiscall fltk::GlWindow::flush(void)" (?flush@GlWindow@fltk@@UAEXXZ)
2>fltk2_gld.lib(Fl_Gl_Window.obj) : error LNK2019: unresolved external symbol __imp__glRasterPos2i@8 referenced in function "public: virtual void __thiscall fltk::GlWindow::flush(void)" (?flush@GlWindow@fltk@@UAEXXZ)
2>fltk2_gld.lib(Fl_Gl_Window.obj) : error LNK2019: unresolved external symbol __imp__glReadBuffer@4 referenced in function "public: virtual void __thiscall fltk::GlWindow::flush(void)" (?flush@GlWindow@fltk@@UAEXXZ)
2>fltk2_gld.lib(Fl_Gl_Choice.obj) : error LNK2019: unresolved external symbol __imp__wglCreateContext@4 referenced in function "struct HGLRC__ * __cdecl fltk::create_gl_context(class fltk::Window const *,class fltk::GlChoice const *,int)" (?create_gl_context@fltk@@YAPAUHGLRC__@@PBVWindow@1@PBVGlChoice@1@H@Z)
2>fltk2_gld.lib(Fl_Gl_Choice.obj) : error LNK2019: unresolved external symbol __imp__wglCreateLayerContext@8 referenced in function "struct HGLRC__ * __cdecl fltk::create_gl_context(class fltk::Window const *,class fltk::GlChoice const *,int)" (?create_gl_context@fltk@@YAPAUHGLRC__@@PBVWindow@1@PBVGlChoice@1@H@Z)
2>fltk2_gld.lib(Fl_Gl_Choice.obj) : error LNK2019: unresolved external symbol __imp__wglDeleteContext@4 referenced in function "void __cdecl fltk::delete_gl_context(struct HGLRC__ *)" (?delete_gl_context@fltk@@YAXPAUHGLRC__@@@Z)
2>fltk2_gld.lib(Fl_Gl_Choice.obj) : error LNK2019: unresolved external symbol __imp__wglMakeCurrent@8 referenced in function "void __cdecl fltk::no_gl_context(void)" (?no_gl_context@fltk@@YAXXZ)
2>fltk2_gld.lib(Fl_Gl_Choice.obj) : error LNK2019: unresolved external symbol __imp__wglShareLists@8 referenced in function "struct HGLRC__ * __cdecl fltk::create_gl_context(class fltk::Window const *,class fltk::GlChoice const *,int)" (?create_gl_context@fltk@@YAPAUHGLRC__@@PBVWindow@1@PBVGlChoice@1@H@Z)
2>.\Debug\CubeView.exe : fatal error LNK1120: 30 unresolved externals
2>Done building project "CubeView.vcxproj" -- FAILED.
========== Build: 1 succeeded, 1 failed, 1 up-to-date, 0 skipped ==========
您似乎需要将 Windows 库添加到 link。
我将从将这些库添加到您的 linker 命令开始:
glu32.lib opengl32.lib ole32.lib uuid.lib comctl32.lib
如果您仍然缺少一些东西,请开始添加这些库(如果您还没有的话)。
kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib oleaut32.lib odbc32.lib odbccp32.lib
我发现了一个可以满足某些需求的程序;源代码在 sourceforge 上可用,但依赖列表缺乏足够的细节。我设法找到了(大部分)它们并根据软件的发布日期选择了版本。目标是让代码像 2011 年最初那样忠实地编译, 然后 担心 upgrading/fixing/migrating 到更新的库。
一个软件包,FLTK,正在使用废弃的 2.0 版本。我找到了两个不同的版本。包含的项目文件为 'one way upgraded' 到 MS2019。许多属性和链接需要修复。
我正在尝试编译测试 'cubeview' 程序,结果有 37 个未解决的依赖项。
如下,我进入了项目,属性,配置属性
Severity Code Description Project File Line Suppression State
Error LNK1120 37 unresolved externals CubeView D:\CodeProjects\fltk-2.0.x-master\fltk-2.0.x-master\ide\vcnet\Debug\CubeView.exe 1
Error LNK2019 unresolved external symbol "public: bool __thiscall fltk::Widget::find(class fltk::AssociationType const &,void *)const " (?find@Widget@fltk@@QBE_NABVAssociationType@2@PAX@Z) referenced in function "public: bool __thiscall fltk::Widget::add_shortcut(unsigned int)" (?add_shortcut@Widget@fltk@@QAE_NI@Z) CubeView D:\CodeProjects\fltk-2.0.x-master\fltk-2.0.x-master\ide\vcnet\ShortcutAssignment.obj 1
Error LNK2019 unresolved external symbol "public: bool __thiscall fltk::Widget::remove(class fltk::AssociationType const &,void *)" (?remove@Widget@fltk@@QAE_NABVAssociationType@2@PAX@Z) referenced in function "public: bool __thiscall fltk::Widget::remove_shortcut(unsigned int)" (?remove_shortcut@Widget@fltk@@QAE_NI@Z) CubeView D:\CodeProjects\fltk-2.0.x-master\fltk-2.0.x-master\ide\vcnet\ShortcutAssignment.obj 1
Error LNK2019 unresolved external symbol "public: void * __thiscall fltk::Widget::foreach(class fltk::AssociationType const &,class fltk::AssociationFunctor &)const " (?foreach@Widget@fltk@@QBEPAXABVAssociationType@2@AAVAssociationFunctor@2@@Z) referenced in function "public: bool __thiscall fltk::Widget::test_shortcut(bool)const " (?test_shortcut@Widget@fltk@@QBE_N_N@Z) CubeView D:\CodeProjects\fltk-2.0.x-master\fltk-2.0.x-master\ide\vcnet\ShortcutAssignment.obj 1
Error LNK2019 unresolved external symbol "public: void * __thiscall fltk::Widget::get(class fltk::AssociationType const &)const " (?get@Widget@fltk@@QBEPAXABVAssociationType@2@@Z) referenced in function "public: unsigned int __thiscall fltk::Widget::shortcut(void)const " (?shortcut@Widget@fltk@@QBEIXZ) CubeView D:\CodeProjects\fltk-2.0.x-master\fltk-2.0.x-master\ide\vcnet\ShortcutAssignment.obj 1
Error LNK2019 unresolved external symbol "public: void __thiscall fltk::Widget::add(class fltk::AssociationType const &,void *)" (?add@Widget@fltk@@QAEXABVAssociationType@2@PAX@Z) referenced in function "public: bool __thiscall fltk::Widget::add_shortcut(unsigned int)" (?add_shortcut@Widget@fltk@@QAE_NI@Z) CubeView D:\CodeProjects\fltk-2.0.x-master\fltk-2.0.x-master\ide\vcnet\ShortcutAssignment.obj 1
Error LNK2019 unresolved external symbol "public: void __thiscall fltk::Widget::set(class fltk::AssociationType const &,void *)" (?set@Widget@fltk@@QAEXABVAssociationType@2@PAX@Z) referenced in function "public: void __thiscall fltk::Widget::remove_shortcuts(void)" (?remove_shortcuts@Widget@fltk@@QAEXXZ) CubeView D:\CodeProjects\fltk-2.0.x-master\fltk-2.0.x-master\ide\vcnet\ShortcutAssignment.obj 1
Error LNK2019 unresolved external symbol "void * __cdecl fltk::foreach(class fltk::AssociationType const *,class fltk::Widget const *,class fltk::AssociationFunctor &)" (?foreach@fltk@@YAPAXPBVAssociationType@1@PBVWidget@1@AAVAssociationFunctor@1@@Z) referenced in function "unsigned int __cdecl fltk::foreachShortcut(class fltk::Widget const *,class fltk::ShortcutFunctor &)" (?foreachShortcut@fltk@@YAIPBVWidget@1@AAVShortcutFunctor@1@@Z) CubeView D:\CodeProjects\fltk-2.0.x-master\fltk-2.0.x-master\ide\vcnet\ShortcutAssignment.obj 1
Error LNK2019 unresolved external symbol "void __cdecl delete_associations_for(class fltk::Widget *)" (?delete_associations_for@@YAXPAVWidget@fltk@@@Z) referenced in function "public: virtual __thiscall fltk::Widget::~Widget(void)" (??1Widget@fltk@@UAE@XZ) CubeView D:\CodeProjects\fltk-2.0.x-master\fltk-2.0.x-master\ide\vcnet\Widget.obj 1
Error LNK2019 unresolved external symbol _WSAAsyncSelect@16 referenced in function "void __cdecl fltk::add_fd(int,int,void (__cdecl*)(int,void *),void *)" (?add_fd@fltk@@YAXHHP6AXHPAX@Z0@Z) CubeView D:\CodeProjects\fltk-2.0.x-master\fltk-2.0.x-master\ide\vcnet\run.obj 1
Error LNK2019 unresolved external symbol __imp__glBegin@4 referenced in function "private: void __thiscall CubeView::drawCube(void)" (?drawCube@CubeView@@AAEXXZ) CubeView D:\CodeProjects\fltk-2.0.x-master\fltk-2.0.x-master\ide\vcnet\CubeView.obj 1
Error LNK2019 unresolved external symbol __imp__glBlendFunc@8 referenced in function "public: virtual void __thiscall CubeView::draw(void)" (?draw@CubeView@@UAEXXZ) CubeView D:\CodeProjects\fltk-2.0.x-master\fltk-2.0.x-master\ide\vcnet\CubeView.obj 1
Error LNK2019 unresolved external symbol __imp__glClear@4 referenced in function "public: virtual void __thiscall CubeView::draw(void)" (?draw@CubeView@@UAEXXZ) CubeView D:\CodeProjects\fltk-2.0.x-master\fltk-2.0.x-master\ide\vcnet\CubeView.obj 1
Error LNK2019 unresolved external symbol __imp__glColor3f@12 referenced in function "private: void __thiscall CubeView::drawCube(void)" (?drawCube@CubeView@@AAEXXZ) CubeView D:\CodeProjects\fltk-2.0.x-master\fltk-2.0.x-master\ide\vcnet\CubeView.obj 1
Error LNK2019 unresolved external symbol __imp__glColor4f@16 referenced in function "private: void __thiscall CubeView::drawCube(void)" (?drawCube@CubeView@@AAEXXZ) CubeView D:\CodeProjects\fltk-2.0.x-master\fltk-2.0.x-master\ide\vcnet\CubeView.obj 1
Error LNK2019 unresolved external symbol __imp__glCopyPixels@20 referenced in function "public: virtual void __thiscall fltk::GlWindow::flush(void)" (?flush@GlWindow@fltk@@UAEXXZ) CubeView D:\CodeProjects\fltk-2.0.x-master\fltk-2.0.x-master\ide\vcnet\fltk2_gld.lib(Fl_Gl_Window.obj) 1
Error LNK2019 unresolved external symbol __imp__glDisable@4 referenced in function "public: virtual void __thiscall fltk::GlWindow::flush(void)" (?flush@GlWindow@fltk@@UAEXXZ) CubeView D:\CodeProjects\fltk-2.0.x-master\fltk-2.0.x-master\ide\vcnet\fltk2_gld.lib(Fl_Gl_Window.obj) 1
Error LNK2019 unresolved external symbol __imp__glDrawBuffer@4 referenced in function "public: virtual void __thiscall fltk::GlWindow::flush(void)" (?flush@GlWindow@fltk@@UAEXXZ) CubeView D:\CodeProjects\fltk-2.0.x-master\fltk-2.0.x-master\ide\vcnet\fltk2_gld.lib(Fl_Gl_Window.obj) 1
Error LNK2019 unresolved external symbol __imp__glEnable@4 referenced in function "public: virtual void __thiscall CubeView::draw(void)" (?draw@CubeView@@UAEXXZ) CubeView D:\CodeProjects\fltk-2.0.x-master\fltk-2.0.x-master\ide\vcnet\CubeView.obj 1
Error LNK2019 unresolved external symbol __imp__glEnd@0 referenced in function "private: void __thiscall CubeView::drawCube(void)" (?drawCube@CubeView@@AAEXXZ) CubeView D:\CodeProjects\fltk-2.0.x-master\fltk-2.0.x-master\ide\vcnet\CubeView.obj 1
Error LNK2019 unresolved external symbol __imp__glFlush@0 referenced in function "public: virtual void __thiscall fltk::GlWindow::flush(void)" (?flush@GlWindow@fltk@@UAEXXZ) CubeView D:\CodeProjects\fltk-2.0.x-master\fltk-2.0.x-master\ide\vcnet\fltk2_gld.lib(Fl_Gl_Window.obj) 1
Error LNK2001 unresolved external symbol __imp__glLoadIdentity@0 CubeView D:\CodeProjects\fltk-2.0.x-master\fltk-2.0.x-master\ide\vcnet\fltk2_gld.lib(Fl_Gl_Window.obj) 1
Error LNK2019 unresolved external symbol __imp__glLoadIdentity@0 referenced in function "public: virtual void __thiscall CubeView::draw(void)" (?draw@CubeView@@UAEXXZ) CubeView D:\CodeProjects\fltk-2.0.x-master\fltk-2.0.x-master\ide\vcnet\CubeView.obj 1
Error LNK2001 unresolved external symbol __imp__glOrtho@48 CubeView D:\CodeProjects\fltk-2.0.x-master\fltk-2.0.x-master\ide\vcnet\fltk2_gld.lib(Fl_Gl_Window.obj) 1
Error LNK2019 unresolved external symbol __imp__glOrtho@48 referenced in function "public: virtual void __thiscall CubeView::draw(void)" (?draw@CubeView@@UAEXXZ) CubeView D:\CodeProjects\fltk-2.0.x-master\fltk-2.0.x-master\ide\vcnet\CubeView.obj 1
Error LNK2019 unresolved external symbol __imp__glPopMatrix@0 referenced in function "public: virtual void __thiscall CubeView::draw(void)" (?draw@CubeView@@UAEXXZ) CubeView D:\CodeProjects\fltk-2.0.x-master\fltk-2.0.x-master\ide\vcnet\CubeView.obj 1
Error LNK2019 unresolved external symbol __imp__glPushMatrix@0 referenced in function "public: virtual void __thiscall CubeView::draw(void)" (?draw@CubeView@@UAEXXZ) CubeView D:\CodeProjects\fltk-2.0.x-master\fltk-2.0.x-master\ide\vcnet\CubeView.obj 1
Error LNK2019 unresolved external symbol __imp__glRasterPos2i@8 referenced in function "public: virtual void __thiscall fltk::GlWindow::flush(void)" (?flush@GlWindow@fltk@@UAEXXZ) CubeView D:\CodeProjects\fltk-2.0.x-master\fltk-2.0.x-master\ide\vcnet\fltk2_gld.lib(Fl_Gl_Window.obj) 1
Error LNK2019 unresolved external symbol __imp__glReadBuffer@4 referenced in function "public: virtual void __thiscall fltk::GlWindow::flush(void)" (?flush@GlWindow@fltk@@UAEXXZ) CubeView D:\CodeProjects\fltk-2.0.x-master\fltk-2.0.x-master\ide\vcnet\fltk2_gld.lib(Fl_Gl_Window.obj) 1
Error LNK2019 unresolved external symbol __imp__glRotatef@16 referenced in function "public: virtual void __thiscall CubeView::draw(void)" (?draw@CubeView@@UAEXXZ) CubeView D:\CodeProjects\fltk-2.0.x-master\fltk-2.0.x-master\ide\vcnet\CubeView.obj 1
Error LNK2019 unresolved external symbol __imp__glScalef@12 referenced in function "public: virtual void __thiscall CubeView::draw(void)" (?draw@CubeView@@UAEXXZ) CubeView D:\CodeProjects\fltk-2.0.x-master\fltk-2.0.x-master\ide\vcnet\CubeView.obj 1
Error LNK2019 unresolved external symbol __imp__glShadeModel@4 referenced in function "private: void __thiscall CubeView::drawCube(void)" (?drawCube@CubeView@@AAEXXZ) CubeView D:\CodeProjects\fltk-2.0.x-master\fltk-2.0.x-master\ide\vcnet\CubeView.obj 1
Error LNK2019 unresolved external symbol __imp__glTranslatef@12 referenced in function "public: virtual void __thiscall CubeView::draw(void)" (?draw@CubeView@@UAEXXZ) CubeView D:\CodeProjects\fltk-2.0.x-master\fltk-2.0.x-master\ide\vcnet\CubeView.obj 1
Error LNK2019 unresolved external symbol __imp__glVertex3fv@4 referenced in function "private: void __thiscall CubeView::drawCube(void)" (?drawCube@CubeView@@AAEXXZ) CubeView D:\CodeProjects\fltk-2.0.x-master\fltk-2.0.x-master\ide\vcnet\CubeView.obj 1
Error LNK2001 unresolved external symbol __imp__glViewport@16 CubeView D:\CodeProjects\fltk-2.0.x-master\fltk-2.0.x-master\ide\vcnet\fltk2_gld.lib(Fl_Gl_Window.obj) 1
Error LNK2019 unresolved external symbol __imp__glViewport@16 referenced in function "public: virtual void __thiscall CubeView::draw(void)" (?draw@CubeView@@UAEXXZ) CubeView D:\CodeProjects\fltk-2.0.x-master\fltk-2.0.x-master\ide\vcnet\CubeView.obj 1
Error LNK2019 unresolved external symbol __imp__wglCreateContext@4 referenced in function "struct HGLRC__ * __cdecl fltk::create_gl_context(class fltk::Window const *,class fltk::GlChoice const *,int)" (?create_gl_context@fltk@@YAPAUHGLRC__@@PBVWindow@1@PBVGlChoice@1@H@Z) CubeView D:\CodeProjects\fltk-2.0.x-master\fltk-2.0.x-master\ide\vcnet\fltk2_gld.lib(Fl_Gl_Choice.obj) 1
Error LNK2019 unresolved external symbol __imp__wglCreateLayerContext@8 referenced in function "struct HGLRC__ * __cdecl fltk::create_gl_context(class fltk::Window const *,class fltk::GlChoice const *,int)" (?create_gl_context@fltk@@YAPAUHGLRC__@@PBVWindow@1@PBVGlChoice@1@H@Z) CubeView D:\CodeProjects\fltk-2.0.x-master\fltk-2.0.x-master\ide\vcnet\fltk2_gld.lib(Fl_Gl_Choice.obj) 1
Error LNK2019 unresolved external symbol __imp__wglDeleteContext@4 referenced in function "void __cdecl fltk::delete_gl_context(struct HGLRC__ *)" (?delete_gl_context@fltk@@YAXPAUHGLRC__@@@Z) CubeView D:\CodeProjects\fltk-2.0.x-master\fltk-2.0.x-master\ide\vcnet\fltk2_gld.lib(Fl_Gl_Choice.obj) 1
Error LNK2019 unresolved external symbol __imp__wglMakeCurrent@8 referenced in function "void __cdecl fltk::no_gl_context(void)" (?no_gl_context@fltk@@YAXXZ) CubeView D:\CodeProjects\fltk-2.0.x-master\fltk-2.0.x-master\ide\vcnet\fltk2_gld.lib(Fl_Gl_Choice.obj) 1
Error LNK2019 unresolved external symbol __imp__wglShareLists@8 referenced in function "struct HGLRC__ * __cdecl fltk::create_gl_context(class fltk::Window const *,class fltk::GlChoice const *,int)" (?create_gl_context@fltk@@YAPAUHGLRC__@@PBVWindow@1@PBVGlChoice@1@H@Z) CubeView D:\CodeProjects\fltk-2.0.x-master\fltk-2.0.x-master\ide\vcnet\fltk2_gld.lib(Fl_Gl_Choice.obj) 1
我未能包含的另一个 'output' 部分:
1>------ Build started: Project: fltk, Configuration: Debug Win32 ------
1>C:\Apps\MSBuild\MSBuild\Microsoft\VC\v160\Microsoft.CppBuild.targets(445,5): warning MSB8004: Output Directory does not end with a trailing slash. This build instance will add the slash as it is required to allow proper evaluation of the Output Directory.
1>C:\Apps\MSBuild\MSBuild\Microsoft\VC\v160\Microsoft.CppBuild.targets(459,5): warning MSB8028: The intermediate directory (Debug\) contains files shared from another project (boxtype.vcxproj, checkers.vcxproj, color_chooser.vcxproj, CubeView.vcxproj, cursor.vcxproj, demo.vcxproj, editor.vcxproj, file_chooser.vcxproj, fltkdll.vcxproj, fltk_images.vcxproj, fltk_opengl.vcxproj, fonts.vcxproj, hello.vcxproj, image.vcxproj, input.vcxproj, label.vcxproj, libjpeg.vcxproj, libpng.vcxproj, pack.vcxproj, qubix.vcxproj, tile.vcxproj, zlib.vcxproj). This can lead to incorrect clean and rebuild behavior.
1>C:\Apps\MSBuild\MSBuild\Microsoft\VC\v160\Microsoft.CppBuild.targets(1455,5): warning MSB8012: TargetPath(D:\CodeProjects\fltk-2.0.x-master\fltk-2.0.x-master\ide\vcnet\..\..\lib\fltk.lib) does not match the Library's OutputFile property value (D:\CodeProjects\fltk-2.0.x-master\fltk-2.0.x-master\lib\fltk2d.lib). This may cause your project to build incorrectly. To correct this, please make sure that $(OutDir), $(TargetName) and $(TargetExt) property values match the value specified in %(Lib.OutputFile).
1>C:\Apps\MSBuild\MSBuild\Microsoft\VC\v160\Microsoft.CppBuild.targets(1457,5): warning MSB8012: TargetName(fltk) does not match the Library's OutputFile property value (fltk2d). This may cause your project to build incorrectly. To correct this, please make sure that $(OutDir), $(TargetName) and $(TargetExt) property values match the value specified in %(Lib.OutputFile).
1>fltk.lib.vcxproj -> D:\CodeProjects\fltk-2.0.x-master\fltk-2.0.x-master\ide\vcnet\..\..\lib\fltk.lib
1>Done building project "fltk.lib.vcxproj".
2>------ Build started: Project: CubeView, Configuration: Debug Win32 ------
2>C:\Apps\MSBuild\MSBuild\Microsoft\VC\v160\Microsoft.CppBuild.targets(459,5): warning MSB8028: The intermediate directory (.\Debug\) contains files shared from another project (boxtype.vcxproj, checkers.vcxproj, color_chooser.vcxproj, cursor.vcxproj, demo.vcxproj, editor.vcxproj, file_chooser.vcxproj, fltk.vcxproj, fltkdll.vcxproj, fltk_images.vcxproj, fltk_opengl.vcxproj, fonts.vcxproj, hello.vcxproj, image.vcxproj, input.vcxproj, label.vcxproj, libjpeg.vcxproj, libpng.vcxproj, pack.vcxproj, qubix.vcxproj, tile.vcxproj, zlib.vcxproj). This can lead to incorrect clean and rebuild behavior.
2>cl : command line warning D9035: option 'Gm' has been deprecated and will be removed in a future release
2>cl : command line warning D9007: '/Gm' requires '/Zi or /ZI'; option ignored
2>CubeMain.cxx
2>CubeView.cxx
2>CubeViewUI.cxx
2>Generating Code...
2>C:\Apps\MSBuild\MSBuild\Microsoft\VC\v160\Microsoft.CppBuild.targets(445,5): warning MSB8004: Output Directory does not end with a trailing slash. This build instance will add the slash as it is required to allow proper evaluation of the Output Directory.
2>C:\Apps\MSBuild\MSBuild\Microsoft\VC\v160\Microsoft.CppBuild.targets(459,5): warning MSB8028: The intermediate directory (Debug\) contains files shared from another project (boxtype.vcxproj, checkers.vcxproj, color_chooser.vcxproj, CubeView.vcxproj, cursor.vcxproj, demo.vcxproj, editor.vcxproj, file_chooser.vcxproj, fltk.vcxproj, fltkdll.vcxproj, fltk_images.vcxproj, fonts.vcxproj, hello.vcxproj, image.vcxproj, input.vcxproj, label.vcxproj, libjpeg.vcxproj, libpng.vcxproj, pack.vcxproj, qubix.vcxproj, tile.vcxproj, zlib.vcxproj). This can lead to incorrect clean and rebuild behavior.
2>Done building project "fltk_opengl.vcxproj".
2>CubeView.obj : error LNK2019: unresolved external symbol __imp__glBegin@4 referenced in function "private: void __thiscall CubeView::drawCube(void)" (?drawCube@CubeView@@AAEXXZ)
2>CubeView.obj : error LNK2019: unresolved external symbol __imp__glBlendFunc@8 referenced in function "public: virtual void __thiscall CubeView::draw(void)" (?draw@CubeView@@UAEXXZ)
2>CubeView.obj : error LNK2019: unresolved external symbol __imp__glClear@4 referenced in function "public: virtual void __thiscall CubeView::draw(void)" (?draw@CubeView@@UAEXXZ)
2>CubeView.obj : error LNK2019: unresolved external symbol __imp__glColor3f@12 referenced in function "private: void __thiscall CubeView::drawCube(void)" (?drawCube@CubeView@@AAEXXZ)
2>CubeView.obj : error LNK2019: unresolved external symbol __imp__glColor4f@16 referenced in function "private: void __thiscall CubeView::drawCube(void)" (?drawCube@CubeView@@AAEXXZ)
2>CubeView.obj : error LNK2019: unresolved external symbol __imp__glEnable@4 referenced in function "public: virtual void __thiscall CubeView::draw(void)" (?draw@CubeView@@UAEXXZ)
2>CubeView.obj : error LNK2019: unresolved external symbol __imp__glEnd@0 referenced in function "private: void __thiscall CubeView::drawCube(void)" (?drawCube@CubeView@@AAEXXZ)
2>CubeView.obj : error LNK2019: unresolved external symbol __imp__glLoadIdentity@0 referenced in function "public: virtual void __thiscall CubeView::draw(void)" (?draw@CubeView@@UAEXXZ)
2>fltk2_gld.lib(Fl_Gl_Window.obj) : error LNK2001: unresolved external symbol __imp__glLoadIdentity@0
2>CubeView.obj : error LNK2019: unresolved external symbol __imp__glOrtho@48 referenced in function "public: virtual void __thiscall CubeView::draw(void)" (?draw@CubeView@@UAEXXZ)
2>fltk2_gld.lib(Fl_Gl_Window.obj) : error LNK2001: unresolved external symbol __imp__glOrtho@48
2>CubeView.obj : error LNK2019: unresolved external symbol __imp__glPopMatrix@0 referenced in function "public: virtual void __thiscall CubeView::draw(void)" (?draw@CubeView@@UAEXXZ)
2>CubeView.obj : error LNK2019: unresolved external symbol __imp__glPushMatrix@0 referenced in function "public: virtual void __thiscall CubeView::draw(void)" (?draw@CubeView@@UAEXXZ)
2>CubeView.obj : error LNK2019: unresolved external symbol __imp__glRotatef@16 referenced in function "public: virtual void __thiscall CubeView::draw(void)" (?draw@CubeView@@UAEXXZ)
2>CubeView.obj : error LNK2019: unresolved external symbol __imp__glScalef@12 referenced in function "public: virtual void __thiscall CubeView::draw(void)" (?draw@CubeView@@UAEXXZ)
2>CubeView.obj : error LNK2019: unresolved external symbol __imp__glShadeModel@4 referenced in function "private: void __thiscall CubeView::drawCube(void)" (?drawCube@CubeView@@AAEXXZ)
2>CubeView.obj : error LNK2019: unresolved external symbol __imp__glTranslatef@12 referenced in function "public: virtual void __thiscall CubeView::draw(void)" (?draw@CubeView@@UAEXXZ)
2>CubeView.obj : error LNK2019: unresolved external symbol __imp__glVertex3fv@4 referenced in function "private: void __thiscall CubeView::drawCube(void)" (?drawCube@CubeView@@AAEXXZ)
2>CubeView.obj : error LNK2019: unresolved external symbol __imp__glViewport@16 referenced in function "public: virtual void __thiscall CubeView::draw(void)" (?draw@CubeView@@UAEXXZ)
2>fltk2_gld.lib(Fl_Gl_Window.obj) : error LNK2001: unresolved external symbol __imp__glViewport@16
2>run.obj : error LNK2019: unresolved external symbol _WSAAsyncSelect@16 referenced in function "void __cdecl fltk::add_fd(int,int,void (__cdecl*)(int,void *),void *)" (?add_fd@fltk@@YAXHHP6AXHPAX@Z0@Z)
2>Widget.obj : error LNK2019: unresolved external symbol "void __cdecl delete_associations_for(class fltk::Widget *)" (?delete_associations_for@@YAXPAVWidget@fltk@@@Z) referenced in function "public: virtual __thiscall fltk::Widget::~Widget(void)" (??1Widget@fltk@@UAE@XZ)
2>fltk2_gld.lib(Fl_Gl_Window.obj) : error LNK2019: unresolved external symbol __imp__glCopyPixels@20 referenced in function "public: virtual void __thiscall fltk::GlWindow::flush(void)" (?flush@GlWindow@fltk@@UAEXXZ)
2>fltk2_gld.lib(Fl_Gl_Window.obj) : error LNK2019: unresolved external symbol __imp__glDisable@4 referenced in function "public: virtual void __thiscall fltk::GlWindow::flush(void)" (?flush@GlWindow@fltk@@UAEXXZ)
2>fltk2_gld.lib(Fl_Gl_Window.obj) : error LNK2019: unresolved external symbol __imp__glDrawBuffer@4 referenced in function "public: virtual void __thiscall fltk::GlWindow::flush(void)" (?flush@GlWindow@fltk@@UAEXXZ)
2>fltk2_gld.lib(Fl_Gl_Window.obj) : error LNK2019: unresolved external symbol __imp__glFlush@0 referenced in function "public: virtual void __thiscall fltk::GlWindow::flush(void)" (?flush@GlWindow@fltk@@UAEXXZ)
2>fltk2_gld.lib(Fl_Gl_Window.obj) : error LNK2019: unresolved external symbol __imp__glRasterPos2i@8 referenced in function "public: virtual void __thiscall fltk::GlWindow::flush(void)" (?flush@GlWindow@fltk@@UAEXXZ)
2>fltk2_gld.lib(Fl_Gl_Window.obj) : error LNK2019: unresolved external symbol __imp__glReadBuffer@4 referenced in function "public: virtual void __thiscall fltk::GlWindow::flush(void)" (?flush@GlWindow@fltk@@UAEXXZ)
2>fltk2_gld.lib(Fl_Gl_Choice.obj) : error LNK2019: unresolved external symbol __imp__wglCreateContext@4 referenced in function "struct HGLRC__ * __cdecl fltk::create_gl_context(class fltk::Window const *,class fltk::GlChoice const *,int)" (?create_gl_context@fltk@@YAPAUHGLRC__@@PBVWindow@1@PBVGlChoice@1@H@Z)
2>fltk2_gld.lib(Fl_Gl_Choice.obj) : error LNK2019: unresolved external symbol __imp__wglCreateLayerContext@8 referenced in function "struct HGLRC__ * __cdecl fltk::create_gl_context(class fltk::Window const *,class fltk::GlChoice const *,int)" (?create_gl_context@fltk@@YAPAUHGLRC__@@PBVWindow@1@PBVGlChoice@1@H@Z)
2>fltk2_gld.lib(Fl_Gl_Choice.obj) : error LNK2019: unresolved external symbol __imp__wglDeleteContext@4 referenced in function "void __cdecl fltk::delete_gl_context(struct HGLRC__ *)" (?delete_gl_context@fltk@@YAXPAUHGLRC__@@@Z)
2>fltk2_gld.lib(Fl_Gl_Choice.obj) : error LNK2019: unresolved external symbol __imp__wglMakeCurrent@8 referenced in function "void __cdecl fltk::no_gl_context(void)" (?no_gl_context@fltk@@YAXXZ)
2>fltk2_gld.lib(Fl_Gl_Choice.obj) : error LNK2019: unresolved external symbol __imp__wglShareLists@8 referenced in function "struct HGLRC__ * __cdecl fltk::create_gl_context(class fltk::Window const *,class fltk::GlChoice const *,int)" (?create_gl_context@fltk@@YAPAUHGLRC__@@PBVWindow@1@PBVGlChoice@1@H@Z)
2>.\Debug\CubeView.exe : fatal error LNK1120: 30 unresolved externals
2>Done building project "CubeView.vcxproj" -- FAILED.
========== Build: 1 succeeded, 1 failed, 1 up-to-date, 0 skipped ==========
您似乎需要将 Windows 库添加到 link。 我将从将这些库添加到您的 linker 命令开始: glu32.lib opengl32.lib ole32.lib uuid.lib comctl32.lib
如果您仍然缺少一些东西,请开始添加这些库(如果您还没有的话)。 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib oleaut32.lib odbc32.lib odbccp32.lib